Part Number Hot Search : 
95R3FKR3 SPN12T20 1231A1 TP2522ND GTM501 HMC1023 8HC90 NJT4031N
Product Description
Full Text Search
 

To Download WM8918 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  w WM8918 ultra low power dac for portable audio applications wolfson microelectronics plc to receive regular email updates, sign up at http://www.wolfsonmicro.com/enews production data, january 2012, rev 4.1 copyright ? 2012 wolfson microelectronics plc description the WM8918 is a high performance ultra-low power stereo dac optimised for portable audio applications. the device features stereo ground-referenced headphone amplifiers using the wolfson ?class-w? amplifier techniques - incorporating an innovative dual-mode charge pump architecture - to optimise efficiency and power consumption during playback. the ground-referenced headphone and line outputs eliminate ac coupling capacitors, and both outputs include common mode feedback paths to reject ground noise. control sequences for audio path setup can be pre-loaded and executed by an integrated control write sequencer to reduce software driver development and minimise pops and clicks via wolfson?s silentswitch? technology. the analogue input stage can be configured for single ended or differential inputs. up to 3 stereo microphone or line inputs may be connected. the input impedance is constant with pga gain setting. a stereo digital microphone interface is provided, with a choice of two inputs. the analogue or digital microphone inputs can be mixed into the headphone or line output paths. a dynamic range controller provides compression and level control to support a wide range of portable recording applications in conjunction with the digital microphone interface. anti-clip and quick release features offer good performance in the presence of loud impulsive noises. retune tm mobile 5-band parametric equaliser with fully programmable coefficients is integrated for optimization of speaker characteristics. programmable dynamic range control is also available for maximizing loudness, protecting speakers from clipping and preventing premature shutdown due to battery droop. common audio sampling frequencies are supported from a wide range of external clocks, either directly or generated via the fll. the WM8918 can operate directly from a single 1.8v switched supply. for optimal power consumption, the digital core can be operated from a 1.0v supply. features ? 3.8mw quiescent power consumption for dac to headphone playback ? dac snr 96db typical, thd -86db typical ? 2.4mw quiescent power consumption for analogue bypass playback ? control write sequencer for pop minimised start-up and shutdown ? single register write for default start-up sequence ? integrated fll provides all necessary clocks - self-clocking modes allow processor to sleep - all standard sample rates from 8khz to 96khz ? stereo digital microphone input ? 3 single ended inputs per stereo channel ? 1 fully differential mic / line input per stereo channel ? digital dynamic range controller (compressor / limiter) ? digital sidetone mixing ? ground-referenced headphone driver ? ground-referenced line outputs ? 32-pin qfn package (4x4mm, 0.4mm pitch) applications ? wireless headsets ? portable multimedia players ? handheld gaming
WM8918 production data w pd, rev 4.1, january 2012 2 block diagram control interface audio interface tdm support aiftxdat bclk / gpio4 aifrxdat lrclk cpvoutp cpgnd cpca cpvoutn cpcb mclk fll / clock circuitry irq / gpio1 class-w ground- referenced outputs micbias vmidc agnd lineoutl lineoutr lineoutfb hpoutl hpoutr hpoutfb adaptive charge pump WM8918 ground-referenced class-w 100nf 20 ? 100nf 20 ? 2.2f 2.2f 2.2f 2.2f cpvdd 4.7f 100nf 20 ? 100nf 20 ? 4.7f 100nf 4.7f avdd micvdd dgnd dcvdd dbvdd bypass l m u x m u x m u x m u x bypass r dac l dac r dynamic range controller (drc) 5-band equaliser digital mono mix digital side tone mixing digital volume control pga pga decimation filters interpolation filters dac digital mic interface dac m u x in1l/dmicdat1 in2l 1f m u x 1f in1r/dmicdat2 in2r sda sclk vmid reference 100nf 100nf
production data WM8918 w pd, rev 4.1, january 2012 3 table of contents description ....................................................................................................... 1 ? features ............................................................................................................ 1 ? applications ..................................................................................................... 1 ? block diagram ................................................................................................ 2 ? table of contents ......................................................................................... 3 ? audio signal paths diagram ...................................................................... 6 ? pin configuration .......................................................................................... 7 ? ordering information .................................................................................. 7 ? pin description ................................................................................................ 8 ? absolute maximum ratings ........................................................................ 9 ? recommended operating conditions ..................................................... 9 ? electrical characteristics ................................................................... 10 ? terminology ............................................................................................................ 10 ? common test conditions .................................................................................... 10 ? input signal path ................................................................................................... 11 ? output signal path ............................................................................................... 11 ? bypass path .............................................................................................................. 12 ? charge pump ............................................................................................................ 13 ? fll ........................................................................................................................... ..... 13 ? other parameters ................................................................................................ 13 ? power consumption .................................................................................... 16 ? common test conditions .................................................................................... 16 ? power consumption measurements .............................................................. 16 ? signal timing requirements .................................................................... 18 ? common test conditions .................................................................................... 18 ? master clock .......................................................................................................... 18 ? audio interface timing ........................................................................................ 19 ? master mode ................................................................................................................... ......................................... 19 ? slave mode ............................................................................................................................... ................................. 20 ? tdm mode ...................................................................................................................... ............................................. 21 ? control interface timing .................................................................................. 22 ? digital filter characteristics .............................................................. 23 ? dmic filter responses ......................................................................................... 24 ? dmic high pass filter responses .................................................................... 24 ? dac filter responses .......................................................................................... 25 ? de-emphasis filter responses ......................................................................... 26 ? device description ...................................................................................... 27 ? introduction ........................................................................................................... 27 ? analogue input signal path .............................................................................. 28 ? input pga enable .............................................................................................................. ...................................... 29 ? input pga configuration........................................................................................................ ............................. 29 ? single-ended input ............................................................................................................ .................................... 31 ? differential line input ....................................................................................................... .................................. 31 ? differential microphone input ................................................................................................. ....................... 32 ? input pga gain control ........................................................................................................ ............................... 32 ? input pga common mode amplifier ............................................................................................... ................... 34 ? electret condenser microphone interface ............................................. 35 ? micbias control ............................................................................................................... ....................................... 35 ?
WM8918 production data w pd, rev 4.1, january 2012 4 micbias current detect ........................................................................................................ .............................. 36 ? micbias current detect filtering .............................................................................................. .................... 37 ? microphone hook switch detection .............................................................................................. ................ 39 ? digital microphone interface .......................................................................... 40 ? digital microphone volume control ............................................................................................................. 42 ? high pass filter .............................................................................................................. ........................................ 44 ? dynamic range control (drc) ........................................................................... 45 ? compression/limiting capabilities ............................................................................................. ..................... 45 ? gain limits ................................................................................................................... ............................................... 47 ? dynamic characteristics ....................................................................................................... ............................ 47 ? anti-clip control ............................................................................................................. ...................................... 48 ? quick release control ......................................................................................................... .............................. 49 ? gain smoothing ................................................................................................................ ....................................... 49 ? initialisation ................................................................................................................ ............................................ 50 ? retune tm mobile parametric equalizer (eq) ................................................ 51 ? default mode (5-band parametric eq) ........................................................................................... ................ 51 ? retune tm mobile mode ............................................................................................................................... ............ 52 ? eq filter characteristics ..................................................................................................... ............................ 52 ? digital mixing ........................................................................................................... 54 ? digital mixing paths .......................................................................................................... .................................... 54 ? dac interface volume boost .................................................................................................... ........................ 56 ? digital sidetone .............................................................................................................. ........................................ 56 ? digital-to-analogue converter (dac) ........................................................... 58 ? dac digital volume control .................................................................................................... .......................... 58 ? dac soft mute and soft un-mute ................................................................................................ ..................... 60 ? dac mono mix .................................................................................................................. .......................................... 61 ? dac de-emphasis ............................................................................................................................... ....................... 61 ? dac sloping stopband filter ................................................................................................... ......................... 62 ? dac oversampling ratio (osr) .................................................................................................. ........................ 62 ? output signal path ............................................................................................... 63 ? output signal paths enable .................................................................................................... .......................... 64 ? headphone / line output signal paths enable ................................................................................... ........ 64 ? output mux control ............................................................................................................ ................................. 69 ? output volume control.......................................................................................................... ............................ 69 ? analogue outputs ................................................................................................. 72 ? headphone outputs ? hpoutl and hpoutr ......................................................................................... .......... 72 ? line outputs ? lineoutl and lineoutr........................................................................................... ................. 72 ? external components for grou nd referenced outputs .................................................................... 73 ? reference voltages and master bias ........................................................... 74 ? pop suppression control .................................................................................. 75 ? disabled input control ........................................................................................................ ............................... 75 ? charge pump ............................................................................................................ 76 ? dc servo .................................................................................................................... 7 7 ? dc servo enable and start-up .................................................................................................. ....................... 77 ? dc servo active modes ......................................................................................................... ............................... 80 ? dc servo readback ............................................................................................................. .................................. 82 ? digital audio interface ....................................................................................... 82 ? master and slave mode operation ............................................................................................... .................. 83 ? operation with tdm ............................................................................................................ ................................... 83 ? bclk frequency ................................................................................................................ ...................................... 84 ? audio data formats (normal mode) .............................................................................................. .................. 84 ? audio data formats (tdm mode).................................................................................................. ...................... 87 ? digital audio interface control..................................................................... 89 ? audio interface output tri-state .............................................................................................. ..................... 90 ?
production data WM8918 w pd, rev 4.1, january 2012 5 bclk and lrclk control ........................................................................................................ .............................. 90 ? companding .................................................................................................................... .......................................... 91 ? loopback ...................................................................................................................... ............................................. 93 ? digital pull-up and pull-down ................................................................................................. ......................... 93 ? clocking and sample rates ............................................................................... 95 ? sysclk control ................................................................................................................ ...................................... 97 ? control interface clocking .................................................................................................... ........................ 97 ? clocking configuration ........................................................................................................ ............................. 98 ? dmic / dac clock control ...................................................................................................... ............................. 98 ? opclk control ................................................................................................................. ....................................... 99 ? toclk control ................................................................................................................. ....................................... 99 ? dac operation at 88.2k / 96k .................................................................................................. ............................ 100 ? frequency locked loop (fll) .......................................................................... 101 ? free-running fll clock ........................................................................................................ ............................. 105 ? gpio outputs from fll ......................................................................................................... .............................. 105 ? example fll calculation ............................................................................................................................... .... 106 ? example fll settings .......................................................................................................... ................................ 107 ? general purpose input/output (gpio) ......................................................... 108 ? irq/gpio1 ..................................................................................................................... .............................................. 108 ? bclk/gpio4 .................................................................................................................... ............................................ 109 ? interrupts .............................................................................................................. 110 ? using in1l and in1r as interrupt inputs ....................................................................................... ............... 114 ? control interface .............................................................................................. 115 ? control write sequencer ............................................................................... 117 ? initiating a sequence ......................................................................................................... ................................. 117 ? programming a sequence ........................................................................................................ ........................ 118 ? default sequences ............................................................................................................. ................................ 121 ? start-up sequence ............................................................................................................. ................................. 121 ? shutdown sequence ............................................................................................................. .............................. 123 ? power-on reset .................................................................................................... 125 ? quick start-up and shutdown ........................................................................ 127 ? quick start-up (default sequence) ............................................................................................. ................. 127 ? fast start-up from standby .................................................................................................... ....................... 127 ? quick shutdown (default sequence).............................................................................................. ............. 128 ? software reset and chip id ............................................................................. 129 ? register map ................................................................................................ 130 ? register bits by address ....................................................................... 134 ? applications information ...................................................................... 173 ? recommended external components ......................................................... 173 ? mic detection sequence using micbias current ..................................... 175 ? package dimensions .................................................................................. 177 ? important notice ....................................................................................... 178 ? address .......................................................................................................... 178 ?
WM8918 production data w pd, rev 4.1, january 2012 6 audio signal paths diagram
production data WM8918 w pd, rev 4.1, january 2012 7 pin configuration the WM8918 is supplied in a 32-pin qfn package. c p v o u t n c p g n d c p v o u t p c p c b i n 1 r / d m i c d a t 2 i n 2 l a i f r x d a t l r c l k i n 1 l / d m i c d a t 1 h p o u t l h p o u t f b h p o u t r a i f t x d a t l i n e o u t l m c l k b c l k / g p i o 4 ordering information device temperature range package moisture sensitivity level peak soldering temperature WM8918cgefl/v -40c to +85c 32-lead qfn (4x4x0.4mm, lead-free) msl3 260c WM8918cgefl/rv -40c to +85c 32-lead qfn (4x4x0.4mm, lead-free, tape and reel) msl3 260c note: reel quantity = 3,500
WM8918 production data w pd, rev 4.1, january 2012 8 pin description pin name type description 1 irq / gpio1 digital input / output interrupt / gpio1 2 sclk digital input control interface clock input 3 sda digital input / output control interface data input / output 4 dbvdd supply digital buffer supply (powers audio interface and control interface) 5 dgnd supply digital ground (retur n path for dcvdd and dbvdd) 6 dcvdd supply digital core supply 7 cpvdd supply charge pump power supply 8 cpca analogue output charge pump flyback capacitor pin 9 cpgnd supply charge pump ground 10 cpcb analogue output charge pump flyback capacitor pin 11 cpvoutp analogue output charge pump positive supply decoupling (powers hpoutl/r, lineoutl/r) 12 cpvoutn analogue output charge pump negative supply decoupling (powers hpoutl/r, lineoutl/r) 13 hpoutl analogue output left headphone output (line or headphone output) 14 hpoutfb analogue input headphone output ground loop noise rejection feedback 15 hpoutr analogue output right headphone output (line or headphone output) 16 lineoutl analogue output left line output 1 (line output) 17 lineoutfb analogue input line output ground loop noise rejection feedback 18 lineoutr analogue output right line output 1 (line output) 19 micvdd supply microphone bias amp supply 20 micbias analogue output microphone bias 21 vmidc analogue output midrail voltage decoupling capacitor 22 agnd supply analogue power return 23 avdd supply analogue power supply (powers analogue inputs, reference, dac) 24 in2r analogue input right channel input 2 25 in1r / dmicdat2 analogue / digital input right channel input 1 / digital microphone data input 2 26 in2l analogue input left channel input 2 27 in1l / dmicdat1 analogue / digital input left channel input 1 / digital microphone data input 1 28 mclk digital input master clock 29 bclk / gpio4 digital input / output audio interface bit clock / gpio4 30 lrclk digital input / output audio interface left / right clock (common for tx and rx) 31 aiftxdat digital output tx digital audio data (digital microphone data) 32 aifrxdat digital input rx digital audio data (dac digital playback data) note: 1. it is recommended that the qfn ground paddle is connected to analogue ground on the application pcb.
production data WM8918 w pd, rev 4.1, january 2012 9 absolute maximum ratings absolute maximum ratings are stress ratings only. permanent damage to the device may be caused by continuously operating at or beyond these limits. device functional oper ating limits and guaranteed performance specifications are given under electrical characteristics at the test conditions specified. esd sensitive device. this device is manufactured on a cmos process. it is therefore generically susceptible to damage from excessive static voltages. proper esd precautions must be taken during handling and storage of this device. wolfson tests its package types according to ipc/jedec j- std-020b for moisture sensitivity to determine acceptable storage conditions prior to surface mount assembly. these levels are: msl1 = unlimited floor life at <30 ? c / 85% relative humidity. not normally stored in moisture barrier bag. msl2 = out of bag storage for 1 year at <30 ? c / 60% relative humidity. supplied in moisture barrier bag. msl3 = out of bag storage for 168 hours at <30 ? c / 60% relative humidity. supplied in moisture barrier bag. the moisture sensitivity level for each package type is specified in ordering information. condition min max avdd, dcvdd -0.3v +2.5v dbvdd -0.3v +4.5v micvdd -0.3v +4.5v cpvdd -0.3v +2.2v hpoutl, hpoutr, lineoutl, lineoutr (cpvdd + 0.3v) * -1 cpvdd + 0.3v voltage range digital inputs dgnd -0.3v dbvdd +0.3v voltage range analogue inputs agnd -0.3v avdd +0.3v temperature range, t a -40 ? c +85 ? c storage temperature after soldering -65 ? c +150 ? c notes: 1. analogue and digital grounds must always be within 0.3v of each other. 2. all digital and analogue supplies are completely independent from each other; there is no restriction on power supply sequencing. 3. hpoutl, hpoutr, lineoutl, lineoutr are outputs, and should not normally become connected to dc levels. however, if the limits above are exceeded, then damage to the WM8918 may occur. recommended operating conditions parameter symbol min typ max unit digital supply range (core) dcvdd 0.95 1.0 1.98 v digital supply range (buffer) dbvdd 1.42 1.8 3.6 v analogue supplies range avdd 1.71 1.8 2.0 v charge pump supply range cpvdd 1.71 1.8 2.0 v microphone bias micvdd 1.71 2.5 3.6 v ground dgnd, agnd, cpgnd 0 v operating temperature (ambient) t a -40 +25 +85 ? c
WM8918 production data w pd, rev 4.1, january 2012 10 electrical characteristics terminology 1. signal-to-noise ratio (db) ? snr is the difference in level between a full scale output signal and the device output noise with no signal applied, measured over a bandwidth of 20hz to 20khz. this ratio is also called idle channel noise. (no auto-zero or automute function is employed). 2. total harmonic distortion (db) ? thd is the difference in level between a 1khz full scale sinewave output signal and the first seven harmonics of the output signal. the amplitude of the fundamental frequency of the output signal is compared to the rms value of the next seven harmonics and expressed as a ratio. 3. total harmonic distortion + noise (db) ? thd+n is the difference in level between a 1khz full scale sine wave output signal and all noise and distortion products in the audio band. the amplitude of the fundamental reference frequency of the output signal is compared to the rms value of all other noise and distortion products and expressed as a ratio. 4. channel separation (db) ? is a measure of the coupling between left and right channels. a full scale signal is applied to the left channel only, the right channel amplitude is measur ed. then a full scale signal is applied to the right channel only and the left channel amplitude is measured. the worst case channel separation is quoted as a ratio. 5. channel level matching (db) ? measures the difference in gain between the left and the right channels. 6. power supply rejection ratio (db) ? psrr is a measure of ripple attenuation between the power supply pin and an output path. with the signal path idle, a small signal sine wave is summed onto the power supply rail, the amplitude of the sine wave is measured at the output port and expressed as a ratio. 7. all performance measurements carried out with 20khz aes 17 low pass filter for distortion measurements, and an a-weighted filter for noise measurement. failure to use such a filter will result in higher thd and lower snr and dynamic range readings than are found in the electrical characteristics. the low pass filter removes out of band noise; although it is not audible it may affect dynamic specification values. common test conditions unless otherwise stated, the following test conditions apply throughout the following sections: ? dcvdd = 1.0v ? dbvdd = 1.8v ? avdd = cpvdd =1.8v ? ambient temperature = +25c ? audio signal: 1khz sine wave, sampled at 48khz with 24-bit data resolution ? sysclk_src = 0 (system clock comes direct from mclk, not from fll). additional, specific test conditions are given within the relevant sections below.
production data WM8918 w pd, rev 4.1, january 2012 11 input signal path pga and microphone boost parameter test conditions min typ max unit minimum pga gain setting l_mode/r_mode= 00b or 01b -1.55 db l_mode/r_mode= 10b +12 maximum pga gain setting l_mode/r_mode= 00b or 01b +28.28 db l_mode/r_mode= 10b +30 single-ended to differential conversion gain l_mode/r_mode= 00b +6 db pga gain accuracy l_mode/r_mode= 00b gain -1.5 to +6.7db -1 +1 db l_mode/r_mode= 00b gain +7.5 to +28.3db -1.5 +1.5 l_mode/r_mode= 1x gain +12 to +24db -1 +1 l_mode/r_mode= 1x gain +27 to +30db -1.5 +1.5 mute attenuation all modes of operation 100 db equivalent input noise l_mode/r_mode= 00b or 01b 30 214 vrms nv/ hz output signal path stereo playback to headphones - dac input to hpoutl+hpoutr pins with 15 ? load test conditions: hpoutl_vol = hpoutr_vol = 111001b (0db) parameter symbol test conditions min typ max unit output power (per channel) p o 1% thd r load = 30 ? 28 0.92 -0.76 mw vrms dbv 1% thd r load = 15 ? 32 0.69 -3.19 mw vrms dbv dc offset dc servo enabled, calibration complete. -1.5 +1.5 mv signal to noise ratio snr a-weighted 90 96 db total harmonic distortion + noise thd+n r l =30 ? ; p o =2mw -91 db r l =30 ? ; p o =20mw -84 r l =15 ? ; p o =2mw -87 -80 r l =15 ? ; p o =20mw -85 channel separation 1khz signal, 0dbfs 100 db 10khz signal, 0dbfs 90 channel level matching 1khz signal, 0dbfs +/-1 db power supply rejection ratio psrr 217hz, 100mvpk-pk 75 db 1khz, 100mv pk-pk 70
WM8918 production data w pd, rev 4.1, january 2012 12 stereo playback to line-out - dac input to lineoutl+lineoutr pins with 10k ? / 50pf load test conditions: lineoutl_vol = lineoutr_vol = 111001b (0db) parameter symbol test conditions min typ max unit full scale output signal level dac 0dbfs output at 0db volume 1.0 0 2.83 vrms dbv vpk-pk dc offset dc servo enabled. calibration complete. -1.5 +1.5 mv signal to noise ratio snr a-weighted 90 96 db total harmonic distortion + noise thd+n 10k ? load -85 -70 db channel separation 1khz signal, 0dbfs 100 db 10khz signal, 0dbfs 90 channel level matching 1khz signal, 0dbfs +/-1 db power supply rejection ratio psrr 217hz, 100mvpk-pk 62 db 1khz, 100mv pk-pk 62 output pgas (hp, line) parameter test conditions min typ max unit minimum pga gain setting -57 db maximum pga gain setting 6 db pga gain step size 1 db pga gain accuracy +6db to -40db -1.5 +1.5 db -40db to -57db -1 +1 mute attenuation hpoutl/r 85 db lineoutl/r 85 db bypass path differential stereo line input to stereo line output - in1l-in2l / in1r-in2r pins to lineoutl+lineoutr pins with 10k ? / 50pf load test conditions: l_mode = r_mode = 01b (differential line) lin_vol = rin_vol = 00101b (0db) lineoutl_vol = lineoutr_vol = 111001b (0db) total signal path gain = 0db parameter symbol test conditions min typ max unit full scale output signal level 1.0 0 2.83 vrms dbv vpk-pk signal to noise ratio snr a-weighted 90 100 dbv total harmonic distortion + noise thd+n -1dbv input -92 -85 dbv channel separation 1khz signal, -1dbv 90 db 10khz signal, -1dbv 80 channel level matching 1khz signal, -1dbv +/-1 db power supply rejection ratio psrr 217hz, 100mv pk-pk 45 db
production data WM8918 w pd, rev 4.1, january 2012 13 charge pump parameter test conditions min typ max unit start-up time 260 ? s cpca normal mode cpvdd v low power mode cpvdd/2 v cpcb normal mode -cpvdd v low power mode -cpvdd/2 v external component requirements to achieve specified headphone output power and performance ? flyback capacitor (between cpca and cpcb) at 2v 1 2.2 ? f cpvoutn capacitor at 2v 2 2.2 ? f cpvoutp capacitor at 2v 2 2.2 ? f fll parameter symbol test conditions min typ max unit input frequency f ref fll_clk_ref_div = 00 0.032 13.5 mhz fll_clk_ref_div = 01 0.064 27 mhz lock time 2 ms free-running mode start-up time vmid enabled 100 ? s free-running mode frequency accuracy reference supplied initially +/-10 % no reference provided +/-30 % other parameters vmid reference parameter test conditions min typ max unit midrail reference voltage (vmidc pin) -3% avdd/2 +3% v charge up time (from fully discharged to 10% below vmid) external capacitor 4.7 ? f 890 s
WM8918 production data w pd, rev 4.1, january 2012 14 microphone bias (for analogue electret condenser microphones) additional test conditions: micbias_ena=1, all parameters measured at the micbias pin parameter symbol test conditions min typ max unit bias voltage. note: 7/6 and 9/10 are available only if micvdd > avdd. note: 3/2 and 4/3 are available only if micvdd 2.5v. v micbias micvdd = 2.5v 3ma load current, micbias_sel = 1xx -10% 3/2 x avdd +10% v micbias_sel = 011 -10% 4/3 x avdd +10% micbias_sel = 010 -10% 7/6 x avdd +10% micbias_sel = 001 -10% 10/9 x avdd +10% micbias_sel = 000 -10% 9/10 avdd +10% drop out voltage between micvdd and micbias 200 mv maximum source current i micbias 4 ma noise spectral density at 1khz 19 nv/ hz power supply rejection ratio micvdd to micbias psrr 1khz, 100mv pk-pk micvdd = 1.71 v 67 db 20khz, 100mv pk-pk micvdd = 1.71 v 76 1khz, 100mv pk-pk micvdd = 2.5 v 88 20khz, 100mv pk-pk micvdd = 2.5 v 84 1khz, 100mv pk-pk micvdd = 3.6 v 61 20khz, 100mv pk-pk micvdd = 3.6 v 70 power supply rejection ratio micvdd and avdd to micbias psrr 1khz, 100mv pk-pk avdd = micvdd = 1.8 v 54 db 20khz, 100mv pk-pk avdd = micvdd = 1.8 v 79 micbias current detect function (see note 1) current detect threshold (microphone insertion) micdet_thr = 00 80 ? a current detect threshold (microphone removal) 60 delay time for current detect interrupt t det 3.2 ms micbias short circuit (hook switch) detect function (see note 1) short circuit detect threshold (button press) micshort_thr = 00 600 ? a short circuit detect threshold (button release) 400 minimum delay time for short circuit detect interrupt t short 47 ms note: 1. if avdd ? 1.8, current threshold values should be multiplied by (avdd/1.8)
production data WM8918 w pd, rev 4.1, january 2012 15 digital inputs / outputs parameter symbol test conditions min typ max unit input high level (digital input) v ih 0.7 ? dbvdd v input low level (digital input) v il 0.3 ? dbvdd v input high level (analogue / digital input) v ih 0.7 ? avdd v input low level (analogue / digital input) v il 0.3 ? avdd v output high level v oh i oh = +1ma 0.9 ? dbvdd v output low level v ol i ol = -1ma 0.1 ? dbvdd v
WM8918 production data w pd, rev 4.1, january 2012 16 power consumption the WM8918 power consumption is dependent on many parameters. most significantly, it depends on supply voltages, sample rates, mode of operation, and output loading. the power consumption on each supply rail varies approximately with the square of the voltage. power consumption is greater at fast sample rates than at slower ones. when the digital audio interface is operating in master mode, the dbvdd cu rrent is significantly greater than in slave mode. (note also that power savings can be made by using mclk as the bclk source in slave mode.) the output load conditions (impedance, capacitance and i nductance) can also impact significantly on the device power consumption. common test conditions unless otherwise stated, the following test conditions apply throughout the following sections: ? ambient temperature = +25c ? audio signal = quiescent (zero amplitude) ? sample rate = 48khz ? mclk = 12.288mhz ? audio interface mode = slave (lrclk_dir=0, bclk_dir=0) ? sysclk_src = 0 (system clock comes direct from mclk, not from fll) additional, variant test conditions are quoted within the relevant sections below. where applicable, power dissipated in the headphone or line loads is included. power consumption measurements stereo playback to headphones - dac input to hpoutl+hpoutr pins with 30 ? load. test conditions: vmid_res = 01 (for normal operation) cp_dyn_pwr = 1 (class-w, charge pump controlled by real-time audio level) variant test conditions avdd dcvdd dbvdd cpvdd micvdd total v ma v ma v ma v ma v ma mw 48khz sample rate 1.80 1.69 1.00 0.76 1.80 0.00 1.80 0.31 2.50 0.01 4.38 8khz sample rate 1.80 1.69 1.00 0.18 1.80 0.00 1.80 0.31 2.50 0.01 3.80 48khz, po = 0.1mw/channel 1khz sine wave 0dbfs hpout_vol= -25db dac_vol= 0db 1.80 1.71 1.00 0.77 1.80 0.00 1.80 1.99 2.50 0.01 7.45 48khz, po = 1mw/channel 1khz sine wave 0dbfs hpout_vol= -15db dac_vol= 0db 1.80 1.73 1.00 0.77 1.80 0.00 1.80 5.61 2.50 0.01 13.99 48khz sample rate, master mode, fll enabled, mclk input frequency = 13mhz 1.80 1.82 1.00 1.05 1.80 0.73 1.80 0.30 2.50 0.01 6.18 48khz sample rate, master mode, fll enabled, mclk input frequency = 32.768khz 1.80 1.83 1.00 0.94 1.80 0.76 1.80 0.29 2.50 0.01 6.14
production data WM8918 w pd, rev 4.1, january 2012 17 stereo playback to line-out - dac input to lineoutl+lineoutr or hpoutl+hpoutr pins with 10k ? / 50pf load test conditions: vmid_res = 01 (for normal operation) cp_dyn_pwr = 1 (class-w, charge pump controlled by real-time audio level) variant test conditions avdd dcvdd dbvdd cpvdd micvdd total v ma v ma v ma v ma v ma mw 48khz sample rate 1.8 1.67 1 0.76 1.8 0.00 1.8 0.36 2.5 0.01 4.43 8khz sample rate 1.8 1.67 1 0.18 1.8 0.00 1.8 0.36 2.5 0.01 3.86 48khz, po = 0dbfs 1khz sine wave 1.8 1.78 1 0.77 1.8 0.00 1.8 2.27 2.5 0.01 8.09 stereo analogue bypass to headphones - in1l/r or in2l/r pins to hpoutl+hpoutr pins with 30 ? load. test conditions: lin_vol = rin_vol = 00101 = +0.0 db mclk = 11.2896mhz digital audio interface disabled note that the analogue bypass configuration does not benefit from the class w dynamic control. variant test conditions avdd dcvdd dbvdd cpvdd micvdd total v ma v ma v ma v ma v ma mw quiescent hpoutvol = 000000 (-57db) 1.8 1.24 1 0.11 1.8 0.00 1.8 0.26 2.5 0.01 2.82 po = 0.1mw/channel 1khz sine wave hpoutvol = 100000 (-25db) 1.8 1.29 1 0.11 1.8 0.00 1.8 2.05 2.5 0.01 6.13 po = 1mw/channel 1khz sine wave hpoutvol = 101010 (-15db) 1.8 1.30 1 0.11 1.8 0.00 1.8 5.86 2.5 0.01 13.02 stereo analogue bypass to line-out - in1l/r or in2l/r pins to lineoutl+lineoutr pins with 30 ? load. test conditions: lin_vol = rin_vol = 00101 = +0.0 db mclk = 11.2896mhz digital audio interface disabled note that the analogue bypass configuration does not benefit from the class w dynamic control. variant test conditions avdd dcvdd dbvdd cpvdd micvdd total v ma v ma v ma v ma v ma mw quiescent lineoutvol = 000000 (-57db) 1.8 1.04 1.0 0.15 1.8 0.00 1.8 0.21 1.8 0.01 2.41 quiescent lineoutvol = 101011 (-14db) 1.8 1.04 1.0 0.15 1.8 0.00 1.8 0.63 1.8 0.01 3.18 quiescent lineoutvol = 111001 (0db) 1.8 1.04 1.0 0.15 1.8 0.00 1.8 1.25 1.8 0.01 4.28 off note: dc servo calibration is retained in this state as long as dcvdd is supplied. this allows fast, pop suppressed start-up from th e off state. variant test conditions avdd dcvdd dbvdd cpvdd micvdd total v ma v ma v ma v ma v ma mw off (default settings) no clocks applied 1.8 0.01 1 0.00 1.8 0.00 1.8 0.01 2.5 0.01 0.04 off (default settings) aifrxdat, mclk, bclk, and lrclk applied 1.8 0.01 1 0.02 1.8 0.00 1.8 0.01 2.5 0.01 0.06
WM8918 production data w pd, rev 4.1, january 2012 18 signal timing requirements common test conditions unless otherwise stated, the following test conditions apply throughout the following sections: ? ambient temperature = +25c ? dcvdd = 1.0v ? dbvdd = avdd = cpvdd = 1.8v ? dgnd = agnd = cpgnd = 0v additional, specific test conditions are given within the relevant sections below. master clock figure 1 master clock timing master clock timing parameter symbol test conditions min typ max unit mclk cycle time t mclky mclk_div=1 40 ns mclk_div=0 80 ns mclk duty cycle t mclkds 60:40 40:60
production data WM8918 w pd, rev 4.1, january 2012 19 audio interface timing master mode figure 2 audio interface timing ? master mode test conditions dcvdd = 1.0v, avdd = dbvdd = cpvd d = 1.8v, dgnd=agnd=cpgnd =0v, t a = +25 o c, master mode, fs=48khz, mclk=256fs, 24-bit data, unless otherwise stated. parameter symbol min typ max unit audio interface timing - master mode lrclk propagation delay from bclk falling edge t dl 20 ns aiftxdat propagation delay from bclk falling edge t dda 20 ns aifrxdat setup time to bclk rising edge t dst 20 ns aifrxdat hold time from bclk rising edge t dht 10 ns
WM8918 production data w pd, rev 4.1, january 2012 20 slave mode bclk (input) lrclk (input) aiftxdat (output) aifrxdat (input) t ds t dd t dh t lrh t lrsu t bch t bcl t bcy figure 3 audio interface timing ? slave mode test conditions dcvdd = 1.0v, avdd = dbvdd = cpvd d = 1.8v, dgnd=agnd=cpgnd =0v, t a = +25 o c, slave mode, fs=48khz, mclk=256fs, 24-bit data, unless otherwise stated. parameter symbol min typ max unit audio interface timing - slave mode bclk cycle time t bcy 50 ns bclk pulse width high t bch 20 ns bclk pulse width low t bcl 20 ns lrclk set-up time to bclk rising edge t lrsu 20 ns lrclk hold time from bclk rising edge t lrh 10 ns aifrxdat hold time from bclk rising edge t dh 10 ns aiftxdat propagation delay from bclk falling edge t dd 20 ns aifrxdat set-up time to bclk rising edge t ds 20 ns note: bclk period must always be greater than or equal to mclk period.
production data WM8918 w pd, rev 4.1, january 2012 21 tdm mode in tdm mode, it is important that two devices do not attempt to drive the aiftxdat pin simultaneously. the timing of the WM8918 aiftxdat tri-stating at the start and end of the data transmission is described below. bclk aiftxdat aiftxdat set-up time aiftxdat release time aiftxdat undriven (tri-state) aiftxdat valid (dmic output) aiftxdat valid aiftxdat undriven (tri-state) figure 4 audio interface timing - tdm mode test conditions avdd = cpvdd = 1.8v , dgnd=agnd=cpgnd= =0v, t a = +25 o c, master mode, fs=48khz, mclk=256fs, 24-bit data, unless otherwise stated. parameter conditions min typ max unit audio data timing information aiftxdat setup time from bclk falling edge dcvdd =2.0v dbvdd = 3.6v 5 ns dcvdd = 1.08v dbvdd = 1.62v 15 ns aiftxdat release time from bclk falling edge dcvdd = 2.0v dbvdd = 3.6v 5 ns dcvdd = 1.08v dbvdd = 1.62v 15 ns
WM8918 production data w pd, rev 4.1, january 2012 22 control interface timing figure 5 control interface timing test conditions dcvdd = 1.0v, avdd = dbvdd = cpvd d = 1.8v, dgnd=agnd=cpgnd =0v, t a =+25 o c, slave mode, fs=48khz, mclk = 256fs, 24-bit data, unless otherwise stated. parameter symbol min typ max unit sclk frequency 400 khz sclk low pulse-width t 1 1300 ns sclk high pulse-width t 2 600 ns hold time (start condition) t 3 600 ns setup time (start condition) t 4 600 ns data setup time t 5 100 ns sda, sclk rise time t 6 300 ns sda, sclk fall time t 7 300 ns setup time (stop condition) t 8 600 ns data hold time t 9 900 ns pulse width of spikes that will be suppressed t ps 0 5 ns
production data WM8918 w pd, rev 4.1, january 2012 23 digital filter characteristics parameter test conditions min typ max unit digital microphone (dmic) filter passband +/- 0.05db 0 0.454 fs -6db 0.5 fs passband ripple +/- 0.05 db stopband 0.546 fs stopband attenuation f > 0.546 fs -60 db dac normal filter passband +/- 0.05db 0 0.454 fs -6db 0.5 fs passband ripple 0.454 fs +/- 0.03 db stopband 0.546 fs stopband attenuation f > 0.546 fs -50 db dac sloping stopband filter passband +/- 0.03db 0 0.25 fs +/- 1db 0.25 fs 0.454 fs -6db 0.5 fs passband ripple 0.25 fs +/- 0.03 db stopband 1 0.546 fs 0.7 fs stopband 1 attenuation f > 0.546 fs -60 db stopband 2 0.7 fs 1.4 fs stopband 2 attenuation f > 0.7 fs -85 db stopband 3 1.4 fs stopband 3 attenuation f > 1.4 fs -55 db dac filters dmic filters mode group delay mode group delay normal 16.5 / fs normal 16.5 / fs sloping stopband 18 / fs terminology 1. stop band attenuation (db) ? the degree to which the frequency spectrum is attenuated (outside audio band) 2. pass-band ripple ? any variation of the frequency response in the pass-band region
WM8918 production data w pd, rev 4.1, january 2012 24 dmic filter responses figure 6 dmic digital filter frequency response figure 7 dmic digital filter ripple dmic high pass filter responses ma gnitude( db) 1 2.6923 7.2484 19.515 52.54 141.45 380.83 1.0253k 2.7605k 7.432k 20.009k -11.736 -10.562 -9.3883 -8.2145 -7.0407 -5.8669 -4.6931 -3.5193 -2.3455 -1.1717 2.1246m hpf_response.res magnitude(db) hpf_response2.res magnitude(db) hpf_response2.res#1 magnitude(db) 2 5.0248 12.624 31.716 79.683 200.19 502.96 1.2636k 3.1747k 7.9761k 20.039k -83.352 -75.017 -66.682 -58.347 -50.012 -41.677 -33.342 -25.007 -16.672 -8.3373 -2.3338m figure 8 dmic digital high pass filter frequency response (48khz, hi-fi mode, dmic_hpf_cut[1:0]=00) figure 9 dmic digital high pass filter ripple (48khz, voice mode, dmic_hpf_cut=01, 10 and 11)
production data WM8918 w pd, rev 4.1, january 2012 25 dac filter responses magnitude(db) -0.005 0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 frequency (fs) figure 10 dac digital filter frequency response; (normal mode); sample rate > 24khz figure 11 dac digital filter ripple (normal mode) magnitude(db) -0.5 -0.45 -0.4 -0.35 -0.3 -0.25 -0.2 -0.15 -0.1 -0.05 0 0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5 frequency (fs) figure 12 dac digital filter frequency response; (sloping stopband mode); sample rate <= 24khz figure 13 dac digital filter ripple (sloping stopband mode)
WM8918 production data w pd, rev 4.1, january 2012 26 de-emphasis filter responses magnitude(db) -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 0 5000 10000 15000 20000 frequency (hz) magnitude(db) -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0.2 0.25 0.3 0 2000 4000 6000 8000 10000 12000 14000 16000 18000 frequency (hz) figure 14 de-emphasis digital filter response (32khz) figure 15 de-emphasis error (32khz) magnitude(db) -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 0 5000 10000 15000 20000 25000 frequency (hz) magnitude(db) -0.1 -0.05 0 0.05 0.1 0.15 0.2 0 5000 10000 15000 20000 25000 frequency (hz) figure 16 de-emphasis digital filter response (44.1khz) figure 17 de-emphasis error (44.1khz) magnitude(db) -12 -10 -8 -6 -4 -2 0 0 5000 10000 15000 20000 25000 30000 frequency (hz) magnitude(db) -0.15 -0.1 -0.05 0 0.05 0.1 0.15 0 5000 10000 15000 20000 25000 30000 frequency (hz) figure 18 de-emphasis digital filter response (48khz) figure 19 de-emphasis error (48khz)
production data WM8918 w pd, rev 4.1, january 2012 27 device description introduction the WM8918 is a high performance ultra-low power stereo codec optimised for portable audio applications. flexible analogue interfaces and powerful digital signal processing (dsp) make it ideal for small portable devices. the WM8918 supports up to 4 analogue audio inputs. one pair of single-ended or differential microphone/line inputs is selected as the analogue input source. an integrated bias reference is provided to power standard electret microphones. the analogue inputs can be mixed into the headphone or line output signal paths. a two-channel digital microphone interface is also supported, with direct input to the dsp core. the digital microphone can be routed to the digital audio interface output and/or mixed into the dac output signal path. one pair of ground-reference class-w headphone outputs is provided; these are powered from an integrated charge pump, enabling high quality, power efficient headphone playback without any requirement for dc blocking capacitors. a dc serv o circuit is available for dc offset correction, thereby suppressing pops and reducing power cons umption. two line outputs are provided; these are also capable of driving ear speakers and stereo headsets. ground loop feedback is available on the headphone outputs and the line outputs, providing rejection of noise on the ground connections. all outputs use wolfson silentswitch? technology for pop and click suppression. the stereo dacs are of hi-fi quality, using a 24-bit low-order oversampling architecture to deliver optimum performance. a flexible clocking arrangement supports many common audio sample rates, whilst an integrated ultra-low power fll provides additional flexibility. a high pass filter is available in the digital microphone path for suppressing low frequency noise such as mechanical vibration and wind noise. a digital mixing path provides a digital microphone sidetone of enhanced quality during voice calls. dac soft mute and un-mute is available for pop-free music playback. the integrated dynamic range controller (drc) and retune tm mobile 5-band parametric equaliser (eq) provide further processing capability of the digital audio paths. the drc provides compression and signal level control to improve the handling of unpredictable signal levels. ?anti-clip? and ?quick release? algorithms improve intelligibility in the presence of transients and impulsive noises. the eq provides the capability to tailor the audio path according to the frequency characteristics of an earpiece or loudspeaker, and/or according to user preferences. the WM8918 has a highly flexible digital audio interface, supporting a number of protocols, including i2s, dsp, msb-first left/right justified, and can operate in master or slave modes. pcm operation is supported in the dsp mode. a-law and ? -law companding are also supported. time division multiplexing (tdm) is available to allow multiple devices to stream data simultaneously on the same bus, saving space and power. the system clock sysclk provides clocking for the dacs, dsp core, digital audio interface and other circuits. sysclk can be derived directly from the mclk pin or via an integrated fll, providing flexibility to support a wide range of clocking schemes. typical portable system mclk frequencies, and sample rates from 8khz to 96khz are all supported. the clocking circuits are configured automatically from the sample rate (fs) and from the sysclk / fs ratio. the integrated fll can be used to generate sysclk from a wide variety of different reference sources and frequencies. the fll can accept a wide range of reference frequencies, which may be high frequency (e.g. 13mhz) or low frequency (eg. 32.768khz). the fll is tolerant of jitter and may be used to generate a stable sysclk from a less stable input signal. the integrated fll can be used as a free-running oscillator, enabling autonomous clocking of the charge pump and dc servo if required. the WM8918 uses a standard 2-wire control interface, providing full software control of all features, together with device register readback. an integrated control write sequencer enables automatic scheduling of control sequences; commonly-used signal configurations may be selected using ready- programmed sequences, including time-optimised control of the WM8918 pop suppression features. it is an ideal partner for a wide range of industr y standard microprocessors, controllers and dsps. unused circuitry can be disabled under software control, in order to save power; low leakage currents enable extended standby/off time in portable battery-powered applications.
WM8918 production data w pd, rev 4.1, january 2012 28 up to 2 gpio pins may be configured for miscellaneous input/output functions such as button/accessory detect inputs, or for clock, system status, or programmable logic level output for control of additional external circuitry. interr upt logic, status readback and de-bouncing options are supported within this functionality. analogue input signal path the WM8918 has four analogue input pins, which may be used to support connections to multiple microphone or line input sources. the input multiplexer on the left and right channels can be used to select different configurations for each of the input sources. the analogue input paths can support line and microphone inputs, in single-ended and differential modes. the input stage can also provide common mode noise rejection in some configurations. two of the analogue input pins have dual functionality and can be used as digital microphone inputs. (see the ?digital microphone interface? section for details.) the left and right analogue input channels are routed to the output multiplexers and pgas. the WM8918 input signal paths and control registers are illustrated in figure 20. figure 20 block diagram for input signal path
production data WM8918 w pd, rev 4.1, january 2012 29 input pga enable the input pgas (programmable gain amplifiers) and multiplexers are enabled using register bits inl_ena and inr_ena, as shown in table 1. register address bit label default description r12 (0ch) power management 0 1 inl_ena 0 left input pga enable 0 = disabled 1 = enabled 0 inr_ena 0 right input pga enable 0 = disabled 1 = enabled table 1 input pga enable to enable the input pgas, the reference voltage vmid and the bias current must also be enabled. see reference voltages and master bias for details of the associated controls vmid_res and bias_ena. input pga configuration the analogue input channels can each be configured in three different modes, which are as follows: ? single-ended mode (inverting) ? differential line mode ? differential mic mode the mode is selected by the l_mode and r_mode fields for the left and right channels respectively. the input pins are selected using the l_ip_sel_n and l_ip_sel_p fields for the left channel and the r_ip_sel_n and r_ip_sel_p for the right channel. in single-ended mode, l_ip_sel_n alone determines the left input pin, and the r_ip_sel_n determines the right input pin. the three modes are illustrated in figure 21, figure 22 and figure 23. it should be noted that the available gain and input impedance varies between configurations (see also ?electrical characteristics?). the input impedance is constant with pga gain setting. the input pga modes are selected and configured using the register fields described in table 2 below.
WM8918 production data w pd, rev 4.1, january 2012 30 register address bit label default description r46 (2eh) analogue left input 1 5:4 l_ip_sel_n [1:0] 00 in single-ended or differential line modes, this field selects the input pin for the inverting side of the left input path. in differential mic mode, this field selects the input pin for the non- inverting side of the left input path. 00 = in1l 01 = in2l 1x = reserved 3:2 l_ip_sel_p [1:0] 01 in single-ended or differential line modes, this field selects the input pin for the non-inverting side of the left input path. in differential mic mode, this field selects the input pin for the inverting side of the left input path. 00 = in1l 01 = in2l 1x = reserved 1:0 l_mode [1:0] 00 sets the mode for the left analogue input: 00 = single-ended 01 = differential line 10 = differential mic 11 = reserved r47 (2fh) analogue right input 1 5:4 r_ip_sel_n [1:0] 00 in single-ended or differential line modes, this field selects the input pin for the inverting side of the right input path. in differential mic mode, this field selects the input pin for the non- inverting side of the right input path. 00 = in1r 01 = in2r 1x = reserved 3:2 r_ip_sel_p [1:0] 01 in single-ended or differential line modes, this field selects the input pin for the non-inverting side of the right input path. in differential mic mode, this field selects the input pin for the inverting side of the right input path. 00 = in1r 01 = in2r 1x = reserved 1:0 r_mode [1:0] 00 sets the mode for the right analogue input: 00 = single-ended 01 = differential line 10 = differential mic 11 = reserved table 2 input pga mode selection
production data WM8918 w pd, rev 4.1, january 2012 31 single-ended input the single-ended pga configuration is illustrated in figure 21 for the left channel. the available gain in this mode is from -1.57db to +28.5db in non-linear steps. the pga output is phase inverted with respect to the selected input pin. different input pins can be selected in the same mode by altering the l_ip_sel_n field. the equivalent configuration is also available on the right channel; this can be selected independently of the left channel mode. figure 21 single ended mode differential line input the differential line pga configuration is illustrated in figure 22 for the left channel. the available gain in this mode is from -1.57db to +28.5db in non-linear steps. the pga output is in phase with the input pin selected by l_ip_sel_p. the pga output is phase inverted with respect to the input pin selected by l_ip_sel_n. as an option, common mode noise rejection can be provided in this pga configuration, as illustrated in figure 22. this is enabled using the register bits defined in table 5. the equivalent configuration is also available on the right channel; this can be selected independently of the left channel mode. bypassl in1l/dmicdat1 in2l - + l_ip_sel_n inl_ena lin_mute lin_vol m u x l_ip_sel_p m u x differential line mode (l_mode = 01) -1.57db to +28.5db, non-linear steps inl_cm_ena + - figure 22 differential line mode
WM8918 production data w pd, rev 4.1, january 2012 32 differential microphone input the differential mic pga configuration is illustrated in figure 23 for the left channel. the available gain in this mode is from +12db to +30db in 3db linear steps. the pga output is in phase with the input pin selected by l_ip_sel_n. the pga output is phase inverted with respect to the input pin selected by l_ip_sel_p. note that the inverting input pin is selected using l_ip_sel_p and the non-inverting input pin is selected using l_ip_sel_n. this is not the same as for the differential line mode. the equivalent configuration is also available on the right channel; this can be selected independently of the left channel mode. bypassl in1l/dmicdat1 in2l l_ip_sel_n inl_ena lin_mute lin_vol m u x l_ip_sel_p m u x differential microphone mode (l_mode = 10) +12db to +30db, 3db steps inl_ena lin_mute lin_vol +12db to +30db, 3db steps + - figure 23 differential microphone mode input pga gain control the volume control gain for the left and right channels be independently controlled using the lin_vol and rin_vol register fields as descri bed in table 3. the available gain range varies according to the selected pga mode as detailed in table 4. note that the value ?00000? must not be used in differential mic mode, as the pga will not function correctly under this setting. in single- ended mode (l_mode / r_mode = 00b), the conversion from single-ended to differential within the WM8918 adds a further 6db of gain to the signal path. each input channel can be independently muted using linmute and rinmute. it is recommended to not adjust the gain dynamically whilst the signal path is enabled; the signal should be muted at the input or output stage prior to adjusting the volume control. register address bit label default description r44 (2ch) analogue left input 0 7 linmute 1 left input pga mute 0 = not muted 1 = muted 4:0 lin_vol [4:0] 00101 left input pga volume (see table 4 for volume range) r45 (2dh) analogue right input 0 7 rinmute 1 right input pga mute 0 = not muted 1 = muted 4:0 rin_vol [4:0] 00101 right input pga volume (see table 4 for volume range) table 3 input pga volume control
production data WM8918 w pd, rev 4.1, january 2012 33 lin_vol [4:0], rin_vol [4:0] gain ? single-ended mode / differential line mode gain ? differential mic mode 00000 -1.5 db not valid 00001 -1.3 db +12 db 00010 -1.0 db +15 db 00011 -0.7 db +18 db 00100 -0.3 db +21 db 00101 0.0 db +24 db 00110 +0.3 db +27 db 00111 +0.7 db +30 db 01000 +1.0 db +30 db 01001 +1.4 db +30 db 01010 +1.8 db +30 db 01011 +2.3 db +30 db 01100 +2.7 db +30 db 01101 +3.2 db +30 db 01110 +3.7 db +30 db 01111 +4.2 db +30 db 10000 +4.8 db +30 db 10001 +5.4 db +30 db 10010 +6.0 db +30 db 10011 +6.7 db +30 db 10100 +7.5 db +30 db 10101 +8.3 db +30 db 10110 +9.2 db +30 db 10111 +10.2 db +30 db 11000 +11.4 db +30 db 11001 +12.7 db +30 db 11010 +14.3 db +30 db 11011 +16.2 db +30 db 11100 +19.2 db +30 db 11101 +22.3 db +30 db 11110 +25.2 db +30 db 11111 +28.3 db +30 db table 4 input pga volume range
WM8918 production data w pd, rev 4.1, january 2012 34 input pga common mode amplifier in differential line mode only, a common mode amplifier can be enabled as part of the input pga circuit. this feature provides approximately 20db reduction in common mode noise on the differential input, which can reduce problematic interference. since the internal signal paths use a differential configuration, they have an inherent immunity to common mode noise (see ?electrical characteristics?). however, the presence of common mode noise can limit the usable signal range of the analogue input path; enabling the common mode amplifier can solve this issue. it should be noted that the common mode amplifier consumes additional power and can also add its own noise to the input signal. for these reasons, it is recommended that the common mode amplifier is only enabled if there is a known source of common mode interference. the common mode amplifier is controlled by the inl_cm_ena and inr_cm_ena fields as described in table 5. although the common mode amplifier may be enabled regardless of the input pga mode, its function is only effective in the differential line mode configuration. register address bit label default description r46 (2eh) analogue left input 1 6 inl_cm_ena 1 left input pga common mode rejection enable 0 = disabled 1 = enabled (only available for l_mode=01 ? differential line) r47 (2fh) analogue right input 1 6 inr_cm_ena 1 right input pga common mode rejection enable 0 = disabled 1 = enabled (only available for r_mode=01 ? differential line) table 5 common mode amplifier enable
production data WM8918 w pd, rev 4.1, january 2012 35 electret condenser microphone interface electret condenser microphones may be connected as single-ended or differential inputs to the input pgas described in the ?analogue input signal path? section. the WM8918 provides a low-noise reference voltage (micbias) suitable for biasing electret condenser microphones. micbias control the micbias reference is provided on the micbias pin. this reference voltage is enabled by setting the micbias_ena register bit. the micbias output voltage is selected using the micbias_sel register. this register selects the output voltage as a ratio of avdd; the actual output voltage scales with avdd. the micbias output is powered from the micvdd supply pin, and uses vmid (ie. avdd/2) as a reference, as illustrated in figure 24. in all cases, micvdd must be at least 200mv greater than the required micbias output voltage. under the default setting of micbias_sel, the micvdd supply may be connected directly to avdd. for other settings of micbias_sel, (ie. for higher micbias voltages), the micvdd supply must be greater than avdd. the micbias generator is illustrated in in figure 24. the associated control registers are defined in table 6. vmidc micbias micvdd agnd micbias_ena micbias_sel[2:0] figure 24 micbias generator register address bit label default description r6 (06h) mic bias control 0 0 micbias_ena 0 micbias enable 0 = disabled 1 = enabled r7 (07h) mic bias control 1 2:0 micbias_sel [2:0] 000 selects micbias voltage 000 = 9/10 x avdd (1.6v) 001 = 10/9 x avdd (2.0v) 010 = 7/6 x avdd (2.1v) 011 = 4/3 x avdd (2.4v) 100 to 111 = 3/2 x avdd (2.7v) note that the voltage scales with avdd. the value quoted in brackets is correct for avdd=1.8v. table 6 micbias control
WM8918 production data w pd, rev 4.1, january 2012 36 micbias current detect a micbias current detect function is provided for ex ternal accessory detection. this is provided in order to detect the insertion/removal of a microphone or the pressing/releasing of the microphone ?hook? switch; these events will cause a signific ant change in micbias current flow, which can be detected and used to generate a signal to the host processor. the micbias current detect function is enabled by setting the micdet_ena register bit. when this function is enabled, two current thresholds can be defined, using the micdet_thr and micshort_thr registers. when a change in micbias current which crosses either threshold is detected, then an interrupt event can be generated. in a typical application, accessory insertion would be detected when the micbias current exceeds micdet_thr, and microphone hookswitch operation would be detected when the micbias current exceeds micshort_thr. the current detect threshold functions are both inputs to the interrupt control circuit and can be used to trigger an interrupt event when either threshold is crossed. both events can also be indicated as an output on a gpio pin - see ?general purpose input/output (gpio)?. the current detect thresholds are enabled and controlled using the registers described in table 7. performance parameters for this circuit block can be found in the ?electrical characteristics? section. hysteresis and filtering is also provided in the both current detect circuits to improve reliability in conditions where ac current spikes are present due to ambient noise conditions. these features are described in the following section. further guidance on the usage of the micbias current monitoring features is also described in the following pages. register address bit label default description r6 (06h) mic bias control 0 6:4 micdet_thr [2:0] 000 micbias current detect threshold (avdd = 1.8v) 000 = 0.070ma 001 = 0.260ma 010 = 0.450ma 011 = 0.640ma 100 = 0.830ma 101 = 1.020ma 110 = 1.210ma 111 = 1.400ma note that the value scales with avdd. the value quoted is correct for avdd=1.8v. 3:2 micshort_thr [1:0] 00 micbias short circuit threshold (avdd = 1.8v) 00 = 0.520ma 01 = 0.880ma 10 = 1.240ma 11 = 1.600ma note that the value scales with avdd. the value quoted is correct for avdd=1.8v. 1 micdet_ena 0 micbias current and short circuit detect enable 0 = disabled 1 = enabled table 7 micbias current detect
production data WM8918 w pd, rev 4.1, january 2012 37 micbias current detect filtering the function of the filtering is to ensure that ac cu rrent spikes caused by ambient noise conditions near the microphone do not lead to incorrect signalling of the microphone insertion/removal status or the microphone hookswitch status. hysteresis on the current thresholds is provided; this means that a different current threshold is used to detect microphone insertion and microphone removal. similarly, a different current threshold is used to detect hookswitch press and hookswtich release. digital filtering of the hookswitch status ensures that the micbias short circuit detection event is only signalled if the micshort_thr threshol d condition has been met for 10 consecutive measurements. in a typical application, microphone insertion would be detected when the micbias current exceeds the current detect threshold set by micdet_thr. when the mic_det_eint_pol interrupt polarity bit is set to 0, then microphone insertion detection will cause the mic_det_eint interrupt status register to be set. for detection of microphone removal, the mic_det_eint_pol bit should be set to 1. when the mic_det_eint_pol interrupt polarity bit is set to 1, then microphone removal detection will cause the mic_det_eint interrupt status register to be set. the detection of these events is bandwidth limited for bes t noise rejection, and is subject to detection delay time t det , as specified in the ?electrical charac teristics?. provided that the micdet_thr field has been set appropriately, each insertion or removal event is guaranteed to be detected within the delay time t det . it is likely that the microphone socket contacts will have mechanical ?bounce? when a microphone is inserted or removed, and hence the resultant control signal will not be a clean logic level transition. since t det has a range of values, it is possible that the interrupt will be generated before the mechanical ?bounce? has ceased. hence after a mic insertion or removal has been detected, a time delay should be applied before re-configuring the mic_det_eint_pol bit. the maximum possible mechanical bounce times for mic insertion and removal must be understood by the software programmer. utilising a gpio pin to monitor the steady state of the microphone detection function does not change the timing of the detection mechanism, so there will also be a delay t det before the signal changes state. it may be desirable to implement de-bounce in the host processor when monitoring the state of the gpio signal. microphone hook switch operation is detected when the micbias current exceeds the short circuit detect threshold set by micshort_thr. using the digital filtering, the hook switch detection event is only signalled if the micshort_thr threshold condition has been met for 10 consecutive measurements. when the mic_shrt_eint_pol interrupt polarity bit is set to 0, then hook switch operation will cause the mic_shrt_eint interrupt status register to be set. for detection of microphone removal, the mic_shrt_eint_pol bit should be set to 1. when the mic_shrt_eint_pol interrupt polarity bit is set to 1, then hook switch release will cause the mic_shrt_eint interrupt status register to be set. the hook switch detection measurement frequency and the detection delay time t short are detailed in the ?electrical characteristics? section. the WM8918 interrupt function is described in the ?inter rupts? section. example control sequences for configuring the interrupts functions for micbias current detection events are described in the ?applications information? section.
WM8918 production data w pd, rev 4.1, january 2012 38 a clock is required for the digital filtering function, and the dc servo must also be running. this requires: ? mclk is present or the fll is selected as the sysclk source in free-running mode ? clk_sys_ena = 1 ? dcs_ena_chan_n is enabled (where n = 0, 1, 2 or 3) any micbias current detect event (accessory insertion/removal or hookswitch press/release) which happens while one or more of the clocking criteria is not satisfied (for example during a low power mode where the cpu has disabled mclk) will stil l be detected, but only after the clocking conditions are met. an example is illustrated in figure 25, where the mic is inserted while mclk is stopped. figure 25 micbias detection events without mclk
production data WM8918 w pd, rev 4.1, january 2012 39 microphone hook switch detection the possibility of spurious hook switch interrupts due to ambient noise conditions can be removed by careful understanding of microphone behaviour under extremely high sound pressure levels or during mechanical shock, and by correct selection of the micbias resistor value; these factors will affect the level of the micbias ac current spikes. in applications where where the current detect thres hold is close to the level of the current spikes, the probability of false detections is reduced by the hysteresis and digital filtering described above. note that the filtering algorithm provides only limited rejection of very high current spikes at frequencies less than or equal to the hook switch detect measurement frequency, or at frequencies equal to harmonics of the hook switch detect measurement frequency. the micbias hook switch detection filtering is illustrated in figure 26. example control sequences for configuring the interrupts functions for micbias current detection events are described in the ?applications information? section. figure 26 micbias hook switch detection filtering
WM8918 production data w pd, rev 4.1, january 2012 40 digital microphone interface the WM8918 supports a stereo digital microphone interface. this may be provided on dmicdat1 or on dmicdat2, as selected by the dmic_src register bit. the analogue signal path from the selected input pin must be disabled when using the digital microphone interface; this is achieved by disabling the associated input pga. the two-channel audio data is multiplexed on the selected input pin. the associated clock, dmicclk, is provided on a gpio pin. the digital microphone input is selected as input by setting the dmic_ena bit. the digital microphone dsp functions are enabled by setting dmicl_ena and dmicr_ena for the left and right channels respectively. the correct digital microphone sampling rate must be selected by setting the dmic_osr128 register to 0. the digital microphone interface configuration is illustrated in figure 27. note that care must be taken to ensure that the respec tive digital logic levels of the microphone are compatible with the digital input thresholds of the WM8918. the digital input thresholds are referenced to dbvdd, as defined in ?electrical characteristics?. it is recommended to power the digital microphones from dbvdd. figure 27 digital microphone interface when a gpio pin is configured as dmic clock output, the WM8918 outputs a clock, which supports digital microphone operation at a multiple of the device sampling rate, in the range 1-3mhz. the digital micropone dsp must be enabled (see table 8) and the sampling rate must be set in order to ensure correct operation of all dsp functions associated with the digital microphone. volume control for the digital microphone interface signals is provided using the registers described in table 9. see ?general purpose input/output (gpio)? for details of configuring the dmicclk output. see ?clocking and sample rates? for details of the supported clocking configurations. when the dmic_ena bit is set, then the in1l/dmicd at1 or in1r/dmicdat2 pin is used as the digital microphone input dmicdat. up to two microphones can share each pin; the two microphones are interleaved as illustrated in figure 28.
production data WM8918 w pd, rev 4.1, january 2012 41 the digital microphone interface requires that mic1 (left channel) transmits a data bit each time that dmicclk is high, and mic2 (right channel) transmits when dmicclk is low. the WM8918 samples the digital microphone data in the middle of each dmicclk clock phase. each microphone must tri- state its data output when the other microphone is transmitting. figure 28 digital microphone interface timing the digital microphone interface control fields are described in table 8. register address bit label default description r10 (0ah) analogue dmic 0 0 dmic_osr12 8 1 dmic oversampling ratio 0 = normal (64 x fs) 1 = reserved this bit must be set to 0 for digital microphone operation. r18 (12h) power management (6) 1 dmicl_ena 0 digital microphone dsp enable 0 = disabled 1 = enabled 0 dmicr_ena 0 digital microphone dsp enable 0 = disabled 1 = enabled r39 (27h) digital microphone 0 12 dmic_ena 0 digital microphone mode 0 = disabled 1 = audio dsp input is from digital microphone interface when dmic_ena = 0, the digital microphone clock (dmicclk) is held low. 11 dmic_src 0 selects digital microphone data input pin 0 = in1l/dmicdat1 1 = in1r/dmicdat2 table 8 digital microphone interface control note that all the gpio pins are referenced to the dbvdd power domain; the in1l and in1r pins are referenced to the avdd power domain. care must be taken to ensure the microphone logic levels are compatible with the applicable power domain.
WM8918 production data w pd, rev 4.1, january 2012 42 digital microphone volume control the output of the digital microphone dsp can be digitally amplified or attenuated over a range from - 71.625db to +17.625db in 0.375db steps. the volume of each channel can be controlled separately. the gain for a given eight-bit code is detailed in table 10. the dmic_vu bit controls the loading of digital vo lume control data. when dmic_vu is set to 0, the dmicl_vol or dmicr_vol control data will be l oaded into the respective control register, but will not actually change the digital gain setting. both l eft and right gain settings are updated when a 1 is written to dmic_vu. this makes it possible to update the gain of both channels simultaneously. register address bit label default description r36 (24h) dmic digital volume left 8 dmic_vu 0 digital microphone volume update writing a 1 to this bit will cause left and right dmic volume to be updated simultaneously 7:0 dmicl_vol [7:0] 1100_0000 (0db) left digital microphone volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h = 0db ? (0.375db steps) efh to ffh = +17.625db (see table 10 for volume range) r37 (25h) dmic digital volume right 8 dmic_vu 0 digital microphone volume update writing a 1 to this bit will cause left and right dmic volume to be updated simultaneously 7:0 dmicr_vol [7:0] 1100_0000 (0db) right digital microphone volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h = 0db ? (0.375db steps) efh to ffh = +17.625db (see table 10 for volume range) table 9 digital microphone volume control
production data WM8918 w pd, rev 4.1, january 2012 43 dmicl_vol or dmicr_vol volume (db) dmicl_vol or dmicr_vol volume (db) dmicl_vol or dmicr_vol volume (db) dmicl_vol or dmicr_vol volume (db) 0h mute 40h -48.000 80h -24.000 c0h 0.000 1h -71.625 41h -47.625 81h -23.625 c1h 0.375 2h -71.250 42h -47.250 82h -23.250 c2h 0.750 3h -70.875 43h -46.875 83h -22.875 c3h 1.125 4h -70.500 44h -46.500 84h -22.500 c4h 1.500 5h -70.125 45h -46.125 85h -22.125 c5h 1.875 6h -69.750 46h -45.750 86h -21.750 c6h 2.250 7h -69.375 47h -45.375 87h -21.375 c7h 2.625 8h -69.000 48h -45.000 88h -21.000 c8h 3.000 9h -68.625 49h -44.625 89h -20.625 c9h 3.375 ah -68.250 4ah -44.250 8ah -20.250 cah 3.750 bh -67.875 4bh -43.875 8bh -19.875 cbh 4.125 ch -67.500 4ch -43.500 8ch -19.500 cch 4.500 dh -67.125 4dh -43.125 8dh -19.125 cdh 4.875 eh -66.750 4eh -42.750 8eh -18.750 ceh 5.250 fh -66.375 4fh -42.375 8fh -18.375 cfh 5.625 10h -66.000 50h -42.000 90h -18.000 d0h 6.000 11h -65.625 51h -41.625 91h -17.625 d1h 6.375 12h -65.250 52h -41.250 92h -17.250 d2h 6.750 13h -64.875 53h -40.875 93h -16.875 d3h 7.125 14h -64.500 54h -40.500 94h -16.500 d4h 7.500 15h -64.125 55h -40.125 95h -16.125 d5h 7.875 16h -63.750 56h -39.750 96h -15.750 d6h 8.250 17h -63.375 57h -39.375 97h -15.375 d7h 8.625 18h -63.000 58h -39.000 98h -15.000 d8h 9.000 19h -62.625 59h -38.625 99h -14.625 d9h 9.375 1ah -62.250 5ah -38.250 9ah -14.250 dah 9.750 1bh -61.875 5bh -37.875 9bh -13.875 dbh 10.125 1ch -61.500 5ch -37.500 9ch -13.500 dch 10.500 1dh -61.125 5dh -37.125 9dh -13.125 ddh 10.875 1eh -60.750 5eh -36.750 9eh -12.750 deh 11.250 1fh -60.375 5fh -36.375 9fh -12.375 dfh 11.625 20h -60.000 60h -36.000 a0h -12.000 e0h 12.000 21h -59.625 61h -35.625 a1h -11.625 e1h 12.375 22h -59.250 62h -35.250 a2h -11.250 e2h 12.750 23h -58.875 63h -34.875 a3h -10.875 e3h 13.125 24h -58.500 64h -34.500 a4h -10.500 e4h 13.500 25h -58.125 65h -34.125 a5h -10.125 e5h 13.875 26h -57.750 66h -33.750 a6h -9.750 e6h 14.250 27h -57.375 67h -33.375 a7h -9.375 e7h 14.625 28h -57.000 68h -33.000 a8h -9.000 e8h 15.000 29h -56.625 69h -32.625 a9h -8.625 e9h 15.375 2ah -56.250 6ah -32.250 aah -8.250 eah 15.750 2bh -55.875 6bh -31.875 abh -7.875 ebh 16.125 2ch -55.500 6ch -31.500 ach -7.500 ech 16.500 2dh -55.125 6dh -31.125 adh -7.125 edh 16.875 2eh -54.750 6eh -30.750 aeh -6.750 eeh 17.250 2fh -54.375 6fh -30.375 afh -6.375 efh 17.625 30h -54.000 70h -30.000 b0h -6.000 f0h 17.625 31h -53.625 71h -29.625 b1h -5.625 f1h 17.625 32h -53.250 72h -29.250 b2h -5.250 f2h 17.625 33h -52.875 73h -28.875 b3h -4.875 f3h 17.625 34h -52.500 74h -28.500 b4h -4.500 f4h 17.625 35h -52.125 75h -28.125 b5h -4.125 f5h 17.625 36h -51.750 76h -27.750 b6h -3.750 f6h 17.625 37h -51.375 77h -27.375 b7h -3.375 f7h 17.625 38h -51.000 78h -27.000 b8h -3.000 f8h 17.625 39h -50.625 79h -26.625 b9h -2.625 f9h 17.625 3ah -50.250 7ah -26.250 bah -2.250 fah 17.625 3bh -49.875 7bh -25.875 bbh -1.875 fbh 17.625 3ch -49.500 7ch -25.500 bch -1.500 fch 17.625 3dh -49.125 7dh -25.125 bdh -1.125 fdh 17.625 3eh -48.750 7eh -24.750 beh -0.750 feh 17.625 3fh -48.375 7fh -24.375 bfh -0.375 ffh 17.625 table 10 digital microphone volume range
WM8918 production data w pd, rev 4.1, january 2012 44 high pass filter a digital high pass filter is applied by default to the dmic path to remove low frequency noise in voice applications (e.g. wind noise or mechanical vibration). this filter is controlled using the dmic_hpf and dmic_hpf_cut register bits. in hi-fi mode the high pass filter is optimised for removing dc offsets without degrading the bass response and has a cut-off frequency of 3.7hz at fs=44.1khz. in voice mode the high pass filter is optimised for voice communication and it is recommended to program the cut-off frequency below 300hz (e.g. dmic_hpf_cut=11 at fs=8khz or dmic_hpf_cut=10 at fs=16khz). register address bit label default description r38 (26h) dmic digital 0 6:5 dmic_hpf_c ut [1:0] 00 dmic digital high pass filter cut-off frequency (fc) 00 = hi-fi mode (fc=4hz at fs=48khz) 01 = voice mode 1 (fc=127hz at fs=16khz) 10 = voice mode 2 (fc=130hz at fs=8khz) 11 = voice mode 3 (fc=267hz at fs=8khz) (note: fc scales with sample rate. see table 12 for cut-off frequencies at all supported sample rates) 4 dmic_hpf 1 dmic digital high pass filter enable 0 = disabled 1 = enabled table 11 dmic digital 0 register sample frequency (khz) cut-off frequency (hz) dmic_hpf_cut =00 dmic_hpf_cut =01 dmic_hpf_cut =10 dmic_hpf_cut =11 8.000 0.7 64 130 267 11.025 0.9 88 178 367 16.000 1.3 127 258 532 22.050 1.9 175 354 733 24.000 2.0 190 386 798 32.000 2.7 253 514 1063 44.100 3.7 348 707 1464 48.000 4.0 379 770 1594 table 12 dmic high pass filter cut-off frequencies the high pass filter characteristics are shown in the ?digital filter characteristics? section.
production data WM8918 w pd, rev 4.1, january 2012 45 dynamic range control (drc) the dynamic range controller (drc) is a circui t which can be enabled in the digital data path of either the digital microphone input or the dac playback. t he function of the drc is to adjust the signal gain in conditions where the input amplitude is unknown or varies over a wide range, e.g. when recording from microphones built into a handheld system. the drc can apply compression and automatic level control to the signal path. it incorporates ?anti -clip? and ?quick release? features for handling transients in order to improve intelligibility in the presence of loud impulsive noises. the drc is enabled by drc_ena, as shown in table 13. it can be enabled in the digital microphone path or in the dac digital path, under the control of the drc_dac_path register bit. note that the drc can be active in only one of these paths at any time. register address bit label default description r40 (28h) drc control 0 15 drc_ena 0 drc enable 0 = disabled 1 = enabled 14 drc_dac_pat h 0 drc path select 0 = digital microphone path 1 = dac path table 13 drc enable compression/limiting capabilities the drc supports two different compression regions , separated by a ?knee? at input amplitude t. for signals above the knee, the compression slope drc_hi_comp applies; for signals below the knee, the compression slope drc_lo_comp applies. the overall drc compression characteristic in ?steady state? (i.e. where the input amplitude is near- constant) is illustrated in figure 29. drc_knee_ip (y0) 0db d r c _h i _c o m p d r c _ l o _ c o m p drc input amplitude (db) drc output amplitude (db) drc_knee_op ?knee? figure 29 drc compression characteristic the slope of the drc response is determined by register fields drc_hi_comp and drc_lo_comp respectively. a slope of 1 indicates constant gain in this region. a slope less than 1 represents compression (i.e. a change in input amplitude produces only a smaller change in output amplitude). a slope of 0 indicates that the target output amplitude is the same across a range of input amplitudes; this is infinite compression.
WM8918 production data w pd, rev 4.1, january 2012 46 the ?knee? in figure 29 is represented by r egister fields drc_knee_ip and drc_knee_op. parameter y0, the output level for a 0db input, is not specified directly, but can be calculated from the other parameters, using the equation the drc compression parameters are defined in table 14. register address bit label default description r43 (2bh) drc control 3 10:5 drc_knee_ip [5:0] 00_0000 input signal at the compressor 'knee'. 000000 = 0db 000001 = -0.75db 000010 = -1.5db ? (-0.75db steps) 111100 = -45db 111101 to 111111 = reserved 4:0 drc_knee_op [4:0] 0_0000 output signal at the compressor 'knee'. 00000 = 0db 00001 = -0.75db 00010 = -1.5db ? (-0.75db steps) 11110 = -22.5db 11111 = reserved r42 (2ah) drc control 2 5:3 drc_hi_comp [2:0] 000 compressor slope (upper region) 000 = 1 (no compression) 001 = 1/2 010 = 1/4 011 = 1/8 100 = 1/16 101 = 0 110 to 111 = reserved 2:0 drc_lo_comp [2:0] 000 compressor slope (lower region) 000 = 1 (no compression) 001 = 1/2 010 = 1/4 011 = 1/8 100 = 0 101 to 111 = reserved table 14 drc compression control
production data WM8918 w pd, rev 4.1, january 2012 47 gain limits the minimum and maximum gain applied by the drc is set by register fields drc_mingain and drc_maxgain. these limits can be used to alte r the drc response from that illustrated in figure 29. if the range between maximum and minimum gain is reduced, then the extent of the dynamic range control is reduced. the maximum gain prevents quiet signals (or silence) from being excessively amplified. register address bit label default description r41 (29h) drc control 1 3:2 drc_mingain [1:0] 10 minimum gain the drc can use to attenuate audio signals 00 = 0db (default) 01 = -6db 10 = -12db 11 = -18db 1:0 drc_maxgain [1:0] 00 maximum gain the drc can use to boost audio signals 00 = 12db 01 = 18db (default) 10 = 24db 11 = 36db table 15 drc gain limits dynamic characteristics the dynamic behaviour determines how quickly the drc responds to changing signal levels. note that the drc responds to the average (rms) signal amplitude over a period of time. drc_atk determines how quickly the drc gain decreases when the signal amplitude is high. drc_dcy determines how quickly the drc gain increases when the signal amplitude is low. these register fields are described in table 16. note that the register defaults are suitable for general purpose microphone use. register address bit label default description r41 (29h) drc control 1 15:12 drc_atk [3:0] 0011 gain attack rate (seconds/6db) 0000 = reserved 0001 = 182s 0010 = 363s 0011 = 726s (default) 0100 = 1.45ms 0101 = 2.9ms 0110 = 5.8ms 0111 = 11.6ms 1000 = 23.2ms 1001 = 46.4ms 1010 = 92.8ms 1011-1111 = reserved
WM8918 production data w pd, rev 4.1, january 2012 48 register address bit label default description 11:8 drc_dcy [3:0] 0010 gain decay rate (seconds/6db) 0000 = 186ms 0001 = 372ms 0010 = 743ms (default) 0011 = 1.49s 0100 = 2.97s 0101 = 5.94s 0110 = 11.89s 0111 = 23.78s 1000 = 47.56s 1001-1111 = reserved table 16 drc attack and decay rates note: for detailed information about drc attack and decay rates, please see wolfson application note wan0247. anti-clip control the drc includes an anti-clip feature to avoid signal clipping when the input amplitude rises very quickly. this feature uses a feed-forward technique for early detection of a rising signal level. signal clipping is avoided by dynamically increasing the gain attack rate when required. the anti-clip feature is enabled using the drc_anticlip bit. note that the feed-forward processing increases the latency in the input signal path. for low-latency applications (e.g. telephony), it may be desirable to reduce the delay, although this will also reduce the effectiveness of the anti-clip feature. the latency is determined by the drc_ff_delay bit. if necessary, the latency can be minimised by disabling the anti-clip feature altogether. the drc anti-clip control bits are described in table 17. register address bit label default description r40 (28h) drc control 0 5 drc_ff_delay 1 feed-forward delay for anti-clip feature 0 = 5 samples 1 = 9 samples time delay can be calculated as 5/f s or 9/ f s , where f s is the sample rate. 1 drc_anticlip 1 anti-clip enable 0 = disabled 1 = enabled table 17 drc anti-clip control note that the anti-clip feature operates entirely in the digital domain. it cannot be used to prevent signal clipping in the analogue domain nor in the source signal. analogue clipping can only be prevented by reducing the analogue signal gain or by adjusting the source signal.
production data WM8918 w pd, rev 4.1, january 2012 49 quick release control the drc includes a quick-release feature to handle short transient peaks that are not related to the intended source signal. for example, in handheld microphone recording, transient signal peaks sometimes occur due to user handling, key presses or accidental tapping against the microphone. the quick release feature ensures that these transients do not cause the intended signal to be masked by the longer time constants of drc_dcy. the quick-release feature is enabled by setting the drc_qr bit. when this bit is enabled, the drc measures the crest factor (peak to rms ratio) of the i nput signal. a high crest factor is indicative of a transient peak that may not be related to the intended source signal. if the crest factor exceeds the level set by drc_qr_thr, then the normal decay rate (drc_dcy) is ignored and a faster decay rate (drc _qr_dcy) is used instead. the drc quick-release control bits are described in table 18. register address bit label default description r40 (28h) drc control 0 2 drc_qr 1 quick release enable 0 = disabled 1 = enabled r41 (29h) drc control 1 7:6 drc_qr_thr [1:0] 01 quick release crest factor threshold 00 = 12db 01 = 18db (default) 10 = 24db 11 = 30db 5:4 drc_qr_dcy [1:0] 00 quick release decay rate (seconds/6db) 00 = 0.725ms (default) 01 = 1.45ms 10 = 5.8ms 11 = reserved table 18 drc quick-release control gain smoothing the drc includes a gain smoothing filter in order to prevent gain ripples. a programmable level of hysteresis is also used to control the drc gain. this improves the handling of very low frequency input signals whose period is close to the drc attac k/decay time. drc gain smoothing is enabled by default and it is recommended to use the default register settings. the extent of the gain smoothing filter may be adjusted or disabled using the control fields described in table 19. register address bit label default description r40 (28h) drc control 0 12:11 drc_gs_hyst _lvl [1:0] 00 gain smoothing hysteresis threshold 00 = low 01 = medium (recommended) 10 = high 11 = reserved 3 drc_gs_ena 1 gain smoothing enable 0 = disabled 1 = enabled 0 drc_gs_hyst 1 gain smoothing hysteresis enable 0 = disabled 1 = enabled table 19 drc gain smoothing
WM8918 production data w pd, rev 4.1, january 2012 50 initialisation when the drc is initialised, the gain is set to the level determined by the drc_startup_gain register field. the default setting is 0db, but values fr om -3db to +6db are available, as described in table 20. register address bit label default description r40 (28h) drc control 0 10:6 drc_startup_ gain [4:0] 00110 initial gain at drc start-up 00000 = -3db 00001 = -2.5db 00010 = -2db 00011 = -1.5db 00100 = -1db 00101 = -0.5db 00110 = 0db (default) 00111 = 0.5db 01000 = 1db 01001 = 1.5db 01010 = 2db 01011 = 2.5db 01100 = 3db 01101 = 3.5db 01110 = 4db 01111 = 4.5db 10000 = 5db 10001 = 5.5db 10010 = 6db 10011 to 11111 = reserved table 20 drc initialisation
production data WM8918 w pd, rev 4.1, january 2012 51 retune tm mobile parametric equalizer (eq) the retune tm mobile parametric equaliser is a circuit that can be enabled in the dac path. the function of the eq is to adjust the frequency characteristic of the output to compensate for unwanted frequency characteristics in the loudspeaker (or other output transducer). it can also be used to tailor the response according to user preferences, for example to accentuate or attenuate specific frequency bands to emulate different sound profiles or env ironments such as concert hall, rock etc. the eq is enabled using the eq_ena bit as shown in table 21. register address bit label default description r134 (86h) eq1 0 eq_ena 0 eq enable 0 = eq disabled 1 = eq enabled table 21 retune tm mobile parametric eq enable the eq can be configured to operate in two modes - ?default? mode or ?retune tm mobile? mode. default mode (5-band parametric eq) in default mode, the cut-off / centre frequencies are fixed as per table 22. the filter bandwidths are also fixed in default mode. the gain of the individual bands (-12db to +12db) can be controlled as described in table 23. note that the cut-off / centre frequencies noted in table 22 are applicable to a dac sample rate of 48khz. when using other sample rates, these frequencies will be scaled in proportion to the selected sample rate. eq band cut-off/centre frequency 1 100 hz 2 300 hz 3 875 hz 4 2400 hz 5 6900 hz table 22 eq band cut-off / centre frequencies register address bit label default description r135 (87h) eq2 4:0 eq_b1_gain [4:0] 01100b (0db) eq band 1 gain (see table 24 for gain range) r136 (88h) eq3 4:0 eq_b2_gain [4:0] 01100b (0db) eq band 2 gain (see table 24 for gain range) r137 (89h) eq4 4:0 eq_b3_gain [4:0] 01100b (0db) eq band 3 gain (see table 24 for gain range) r138 (8ah) eq5 4:0 eq_b4_gain [4:0] 01100b (0db) eq band 4 gain (see table 24 for gain range) r139 (8bh) eq6 4:0 eq_b5_gain [4:0] 01100b (0db) eq band 5 gain (see table 24 for gain range) table 23 eq band gain control
WM8918 production data w pd, rev 4.1, january 2012 52 eq gain setting gain (db) 00000 -12 00001 -11 00010 -10 00011 -9 00100 -8 00101 -7 00110 -6 00111 -5 01000 -4 01001 -3 01010 -2 01011 -1 01100 0 01101 +1 01110 +2 01111 +3 10000 +4 10001 +5 10010 +6 10011 +7 10100 +8 10101 +9 10110 +10 10111 +11 11000 +12 11001 to 11111 reserved table 24 eq gain control retune tm mobile mode retune tm mobile mode provides a comprehensive facility for the user to define the cut-off/centre frequencies and filter bandwidth for each eq band, in addition to the gain controls already described. this enables the eq to be accurately customised for a specific transducer characteristic or desired sound profile. the eq enable and eq gain controls are the same as defined for the default mode. the additional coefficients used in retune tm mobile mode are held in registers r140 to r157. these coefficients are derived using tools provided in wolfson? s wisce? evaluation board control software. please contact your local wolfson representative for more details. eq filter characteristics the filter characteristics for each frequency band are shown in figure 30 to figure 34. these figures show the frequency response for all available gain settings, using default cut-off/centre frequencies and bandwidth.
production data WM8918 w pd, rev 4.1, january 2012 53 -15 -10 -5 0 5 10 15 1 10 100 1000 10000 100000 frequency (hz) gain (db) -15 -10 -5 0 5 10 15 1 10 100 1000 10000 100000 frequency (hz) gain (db) figure 30 eq band 1 ? low freq shelf filter response figure 31 eq band 2 ? peak filter response -15 -10 -5 0 5 10 15 1 10 100 1000 10000 100000 frequency (hz) gain (db) -15 -10 -5 0 5 10 15 1 10 100 1000 10000 100000 frequency (hz) gain (db) figure 32 eq band 3 ? peak filter response figure 33 eq band 4 ? peak filter response -15 -10 -5 0 5 10 15 1 10 100 1000 10000 100000 frequency (hz) gain (db) figure 34 eq band 5 ? high freq shelf filter response
WM8918 production data w pd, rev 4.1, january 2012 54 digital mixing the digital microphone and dac data can be combined in various ways to support a range of different usage modes. data from either of the two digital microphone channels can be routed to either the left or the right channel of the digital audio interface. in addition, data from either of the digital audio interface channels can be routed to either the left or the right dac. see "digital audio interface" for more information on the audio interface. the WM8918 provides a dynamic range control (drc) feature, which can apply compression and gain adjustment in the digital domain to either the digital microphone or dac signal path. this is effective in controlling signal levels under conditions where input amplitude is unknown or varies over a wide range. the dacs can be configured as a mono mix of the two audio channels. digital sidetone from the digital microphones can also be selectively mixed into the dac output path. digital mixing paths figure 35 shows the digital mixing paths available in the WM8918 digital core. figure 35 digital mixing paths
production data WM8918 w pd, rev 4.1, january 2012 55 the polarity of each digital microphone output signal can be changed under software control using the aiftxl_datinv and aiftxr_datinv register bits. the aiftxl_src and aiftxr_src register bits may be used to select which digital microphone channel is used for the left and right digital audio interface data. these register bits are described in table 25. register address bit label default description r24 (18h) audio interface 0 7 aiftxl_src 0 left digital audio interface source 0 = left dmic data is output on left channel 1 = right dmic data is output on left channel 6 aiftxr_src 1 right digital audio interface source 0 = left dmic data is output on right channel 1 = right dmic data is output on right channel r38 (26h) dmic digital 0 1 aiftxl_datin v 0 left digital microphone invert 0 = left dmic output not inverted 1 = left dmic output inverted 0 aiftxr_datin v 0 right digital microphone invert 0 = right dmic output not inverted 1 = right dmic output inverted table 25 dmic routing and control the input data source for each dac can be changed under software control using register bits aifrxl_src and aifrxr_src. the polarity of each dac input may also be modified using register bits aifrxl_datinv and aifrxr_datinv. thes e register bits are described in table 26. register address bit label default description r24 (18h) audio interface 0 12 aifrxl_datin v 0 left dac invert 0 = left dac output not inverted 1 = left dac output inverted 11 aifrxr_datin v 0 right dac invert 0 = right dac output not inverted 1 = right dac output inverted 5 aifrxl_src 0 left dac data source select 0 = left dac outputs left interface data 1 = left dac outputs right interface data 4 aifrxr_src 1 right dac data source select 0 = right dac outputs left interface data 1 = right dac outputs right interface data table 26 dac routing and control
WM8918 production data w pd, rev 4.1, january 2012 56 dac interface volume boost a digital gain function is available at the audio i nterface to boost the dac volume when a small signal is received on aifrxdat. this is controlled using register bits dac_boost [1:0]. to prevent clipping at the dac input, this function should not be used when the boosted dac data is expected to be greater than 0dbfs. the digital interface volume is controlled as shown in table 27. register address bit label default description r24 (18h) audio interface 0 10:9 dac_boost [1:0] 00 dac input volume boost 00 = 0db 01 = +6db (input data must not exceed -6dbfs) 10 = +12db (input data must not exceed -12dbfs) 11 = +18db (input data must not exceed -18dbfs) table 27 dac interface volume boost digital sidetone a digital sidetone is available, allowing digital data from either left or right digital microphone (tx) channels to be mixed with the audio interface data on the left and right dac (rx) channels. sidetone data is taken from the dmic high pass filter output, to reduce low frequency noise in the sidetone (e.g. wind noise or mechanical vibration). when using the digital sidetone, it is recommended that the dmic paths are enabled before un- muting the dacs to prevent pop noise. the dac volumes and sidetone volumes should be set to an appropriate level to avoid clipping at the dac input. when digital sidetone is used, it is recommended that the charge pump operates in register control mode only (cp_dyn_pwr = 0). see ?charge pump? for details. the digital sidetone is controlled as shown in table 28. register address bit label default description r32 (20h) dac digital 0 11:8 dmicl_dac_svol [3:0] 0000 left digital sidetone volume (see table 29 for volume range) 7:4 dmicr_dac_svol [3:0] 0000 right digital sidetone volume (see table 29 for volume range) 3:2 dmic_to_dacl [1:0] 00 left dac digital sidetone source 00 = no sidetone 01 = left dmic 10 = right dmic 11 = reserved 1:0 dmic_to_dacr [1:0] 00 right dac digital sidetone source 00 = no sidetone 01 = left dmic 10 = right dmic 11 = reserved table 28 digital sidetone control
production data WM8918 w pd, rev 4.1, january 2012 57 the digital sidetone volume settings are shown in table 29. dacl_dac_svol or dacr_dac_svol sidetone volume 0000 -36 0001 -33 0010 -30 0011 -27 0100 -24 0101 -21 0110 -18 0111 -15 1000 -12 1001 -9 1010 -6 1011 -3 1100 0 1101 0 1110 0 1111 0 table 29 digital sidetone volume
WM8918 production data w pd, rev 4.1, january 2012 58 digital-to-analogue converter (dac) the WM8918 dacs receive digital input data from the aifrxdat pin and via the digital sidetone path (see ?digital mixing? section). the digital audi o data is converted to oversampled bit streams in the on-chip, true 24-bit digital interpolation filters. the bitstream data enters two multi-bit, sigma-delta dacs, which convert them to high quality analogue audio signals. the wolfson smartdac? architecture offers reduced power consumption, whilst also delivering a reduction in high frequency noise and sensitivity to clock jitter. it also uses a dynamic element matching technique for high linearity and low distortion. the analogue outputs from the dacs are sent directly to the output pgas (see ?output signal path?). the dacs are enabled by the dacl_ena and dacr_ena register bits. register address bit label default description r18 (12h) power management 6 3 dacl_ena 0 left dac enable 0 = dac disabled 1 = dac enabled 2 dacr_ena 0 right dac enable 0 = dac disabled 1 = dac enabled table 30 dac enable control dac digital volume control the output level of each dac can be controlled digitally over a range from -71.625db to 0db in 0.375db steps. the level of attenuation for an eight-bit code is detailed in table 32. the dac_vu bit controls the loading of digital volume control data. when dac_vu is set to 0, the dacl_vol or dacr_vol control data is loaded into the respective control register, but does not actually change the digital gain setting. both l eft and right gain settings are updated when a 1 is written to dac_vu. this makes it possible to update the gain of both channels simultaneously. register address bit label default description r30 (1eh) dac digital volume left 8 dac_vu n/a dac volume update writing a 1 to this bit causes left and right dac volume to be updated simultaneously 7:0 dacl_vol [7:0] 1100_0000 (0db) left dac digital volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h to ffh = 0db (see table 32 for volume range) r31 (1fh) dac digital volume right 8 dac_vu n/a dac volume update writing a 1 to this bit causes left and right dac volume to be updated simultaneously 7:0 dacr_vol [7:0] 1100_0000 (0db) right dac digital volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h to ffh = 0db (see table 32 for volume range) table 31 dac digital volume control
production data WM8918 w pd, rev 4.1, january 2012 59 dacl_vol or dacr_vol volume (db) dacl_vol or dacr_vol volume (db) dacl_vol or dacr_vol volume (db) dacl_vol or dacr_vol volume (db) 0h mute 40h -48.000 80h -24.000 c0h 0.000 1h -71.625 41h -47.625 81h -23.625 c1h 0.000 2h -71.250 42h -47.250 82h -23.250 c2h 0.000 3h -70.875 43h -46.875 83h -22.875 c3h 0.000 4h -70.500 44h -46.500 84h -22.500 c4h 0.000 5h -70.125 45h -46.125 85h -22.125 c5h 0.000 6h -69.750 46h -45.750 86h -21.750 c6h 0.000 7h -69.375 47h -45.375 87h -21.375 c7h 0.000 8h -69.000 48h -45.000 88h -21.000 c8h 0.000 9h -68.625 49h -44.625 89h -20.625 c9h 0.000 ah -68.250 4ah -44.250 8ah -20.250 cah 0.000 bh -67.875 4bh -43.875 8bh -19.875 cbh 0.000 ch -67.500 4ch -43.500 8ch -19.500 cch 0.000 dh -67.125 4dh -43.125 8dh -19.125 cdh 0.000 eh -66.750 4eh -42.750 8eh -18.750 ceh 0.000 fh -66.375 4fh -42.375 8fh -18.375 cfh 0.000 10h -66.000 50h -42.000 90h -18.000 d0h 0.000 11h -65.625 51h -41.625 91h -17.625 d1h 0.000 12h -65.250 52h -41.250 92h -17.250 d2h 0.000 13h -64.875 53h -40.875 93h -16.875 d3h 0.000 14h -64.500 54h -40.500 94h -16.500 d4h 0.000 15h -64.125 55h -40.125 95h -16.125 d5h 0.000 16h -63.750 56h -39.750 96h -15.750 d6h 0.000 17h -63.375 57h -39.375 97h -15.375 d7h 0.000 18h -63.000 58h -39.000 98h -15.000 d8h 0.000 19h -62.625 59h -38.625 99h -14.625 d9h 0.000 1ah -62.250 5ah -38.250 9ah -14.250 dah 0.000 1bh -61.875 5bh -37.875 9bh -13.875 dbh 0.000 1ch -61.500 5ch -37.500 9ch -13.500 dch 0.000 1dh -61.125 5dh -37.125 9dh -13.125 ddh 0.000 1eh -60.750 5eh -36.750 9eh -12.750 deh 0.000 1fh -60.375 5fh -36.375 9fh -12.375 dfh 0.000 20h -60.000 60h -36.000 a0h -12.000 e0h 0.000 21h -59.625 61h -35.625 a1h -11.625 e1h 0.000 22h -59.250 62h -35.250 a2h -11.250 e2h 0.000 23h -58.875 63h -34.875 a3h -10.875 e3h 0.000 24h -58.500 64h -34.500 a4h -10.500 e4h 0.000 25h -58.125 65h -34.125 a5h -10.125 e5h 0.000 26h -57.750 66h -33.750 a6h -9.750 e6h 0.000 27h -57.375 67h -33.375 a7h -9.375 e7h 0.000 28h -57.000 68h -33.000 a8h -9.000 e8h 0.000 29h -56.625 69h -32.625 a9h -8.625 e9h 0.000 2ah -56.250 6ah -32.250 aah -8.250 eah 0.000 2bh -55.875 6bh -31.875 abh -7.875 ebh 0.000 2ch -55.500 6ch -31.500 ach -7.500 ech 0.000 2dh -55.125 6dh -31.125 adh -7.125 edh 0.000 2eh -54.750 6eh -30.750 aeh -6.750 eeh 0.000 2fh -54.375 6fh -30.375 afh -6.375 efh 0.000 30h -54.000 70h -30.000 b0h -6.000 f0h 0.000 31h -53.625 71h -29.625 b1h -5.625 f1h 0.000 32h -53.250 72h -29.250 b2h -5.250 f2h 0.000 33h -52.875 73h -28.875 b3h -4.875 f3h 0.000 34h -52.500 74h -28.500 b4h -4.500 f4h 0.000 35h -52.125 75h -28.125 b5h -4.125 f5h 0.000 36h -51.750 76h -27.750 b6h -3.750 f6h 0.000 37h -51.375 77h -27.375 b7h -3.375 f7h 0.000 38h -51.000 78h -27.000 b8h -3.000 f8h 0.000 39h -50.625 79h -26.625 b9h -2.625 f9h 0.000 3ah -50.250 7ah -26.250 bah -2.250 fah 0.000 3bh -49.875 7bh -25.875 bbh -1.875 fbh 0.000 3ch -49.500 7ch -25.500 bch -1.500 fch 0.000 3dh -49.125 7dh -25.125 bdh -1.125 fdh 0.000 3eh -48.750 7eh -24.750 beh -0.750 feh 0.000 3fh -48.375 7fh -24.375 bfh -0.375 ffh 0.000 table 32 dac digital volume range
WM8918 production data w pd, rev 4.1, january 2012 60 dac soft mute and soft un-mute the WM8918 has a soft mute function. when enabled, this gradually attenuates the volume of the dac output. when soft mute is disabled, the gain will either gradually ramp back up to the digital gain setting, or return instantly to the digital gain setting, depending on the dac_unmute_ramp register bit. to mute the dac, this function must be enabled by setting dac_mute to 1. soft mute mode would typically be enabled (dac_unmute_ramp = 1) when using dac_mute during playback of audio data so that when dac_mute is subsequently disabled, the sudden volume increase will not create pop noise by jumping immediately to the previous volume level (e.g. resuming playback after pausing during a track). soft mute mode would typically be disabled (dac_unmute_ramp = 0) when un-muting at the start of a music file, in order that the first part of the track is not attenuated (e.g. when starting playback of a new track, or resuming playback after pausing between tracks). dac muting and un-muting using volume control bits dacl_vol and dacr_vol. dac muting and un-muting using the dac_mute bit. if soft mute mode is not enabled (dac_unmute_ramp = 0): setting the dac_mute bit causes the volume to ramp down at a rate controlled by dac_muterate. clearing the dac_mute bit causes the volume to return to the un-muted level immediately. dac muting and un-muting using the dac_mute bit. if soft mute mode is enabled (dac_unmute_ramp = 1): setting the dac_mute bit causes the volume to ramp down. clearing the dac_mute bit causes the volume to ramp up to the un-muted level at a rate controlled by dac_muterate. figure 36 dac mute control the volume ramp rate during soft mute and un-mute is controlled by the dac_muterate bit. ramp rates of fs/32 and fs/2 can be selected, as shown in table 33. the ramp rate determines the rate at which the volume is increased or decreased. the actual ramp time depends on the extent of the difference between the muted and un-muted volume settings.
production data WM8918 w pd, rev 4.1, january 2012 61 register address bit label default description r33 (21h) dac digital 1 10 dac_mutera te 0 dac soft mute ramp rate 0 = fast ramp (fs/2, maximum ramp time is 10.7ms at fs=48k) 1 = slow ramp (fs/32, maximum ramp time is 171ms at fs=48k) 9 dac_unmute _ramp 0 dac soft mute mode 0 = disabling soft-mute (dac_mute=0) will cause the dac volume to change immediately to dacl_vol and dacr_vol settings 1 = disabling soft-mute (dac_mute=0) will cause the dac volume to ramp up gradually to the dacl_vol and dacr_vol settings 3 dac_mute 1 dac soft mute control 0 = dac un-mute 1 = dac mute table 33 dac soft-mute control dac mono mix a dac digital mono-mix mode can be enabled using the dac_mono register bit. this mono mix will be output on whichever dac is enabled. to prevent clipping, a -6db attenuation is automatically applied to the mono mix. the mono mix is only supported when one or other dac is disabled. when the mono mix is selected, then the mono mix is output on the enabled dac only; there is no output from the disabled dac. if dacl_ena and dacr_ena are both set, then stereo operation applies. register address bit label default description r33 (21h) dac digital 1 12 dac_mono 0 dac mono mix 0 = stereo 1 = mono (mono mix output on enabled dac) table 34 dac mono mix dac de-emphasis digital de-emphasis can be applied to the dac playback data (e.g. when the data comes from a cd with pre-emphasis used in the recording). de-emphasis filtering is available for sample rates of 48khz, 44.1khz and 32khz. see ?digital filter c haracteristics? for details of de-emphasis filter characteristics. register address bit label default description r33 (21h) dac digital 1 2:1 deemph [1:0] 00 dac de-emphasis control 00 = no de-emphasis 01 = 32khz sample rate 10 = 44.1khz sample rate 11 = 48khz sample rate table 35 dac de-emphasis control
WM8918 production data w pd, rev 4.1, january 2012 62 dac sloping stopband filter two dac filter types are available, selected by the register bit dac_sb_filt. when operating at sample rates <= 24khz (eg. during voice communication) it is recommended that the sloping stopband filter type is selected (dac_sb_filt=1) to reduce out-of-band noise which can be audible at low dac sample rates. see ?digital filter charac teristics? for details of dac filter characteristics. register address bit label default description r33 (21h) dac digital 1 11 dac_sb_filt 0 selects dac filter characteristics 0 = normal mode 1 = sloping stopband mode (recommended when fs ??? 24khz ? table 36 dac sloping stopband filter dac oversampling ratio (osr) the dac oversampling rate is programmable to al low power consumption versus audio performance trade-offs. the default oversampling rate is low for reduced power consumption; using the higher osr setting improves the dac signal-to-noise performance. register address bit label default description r33 (21h) dac digital 1 6 dac_osr128 0 dac oversample rate select 0 = low power (normal osr) 1 = high performance (double osr) table 37 dac oversampling control
production data WM8918 w pd, rev 4.1, january 2012 63 output signal path the outputs hpoutl and lineoutl are normally derived from the left dac output, whilst the outputs hpoutr and lineoutr are normally derived from the right dac output, as illustrated in figure 37. a multiplexer is provided on each output path to select the bypassl or bypassr analogue input signals in place of the dac outputs. a feedback path for common mode noise rejection is provided at hpoutfb and lineoutfb for the headphone and line outputs respectively. this pin must be connected to ground for normal operation. each analogue output can be separately enabled; independent volume control is also provided for each output. the output signal paths and associated control registers are illustrated in figure 37. see ?analogue outputs? for details of the external connections to these outputs. hpoutl hpoutfb charge pump cpvdd cpgnd cpvoutp cpcb cpca cpvoutn hpoutr dc servo avdd dcvdd hpout and lineout drivers bypassl bypassr hpoutl_mute hpout_vu hpoutlzc hpoutl_vol (-57db to +6db, 1 db steps) hpoutr_mute hpout_vu hpoutrzc hpoutr_vol (-57db to +6db, 1 db steps) lineoutl_mute lineout_vu lineoutlzc lineoutl_vol (-57db to +6db, 1 db steps) lineoutr_mute lineout_vu lineoutrzc lineoutr_vol (-57db to +6db, 1 db steps) hpl_pga_ena hpr_pga_ena lineoutl_pga_ena lineoutr_pga_ena lineoutl lineoutfb lineoutr dac l dac r m u x m u x m u x m u x bypassl bypassr dacl dacr hpl_byp_ena hpr_byp_ena lineoutl_byp_ena lineoutr_byp_ena figure 37 output signal path and control registers
WM8918 production data w pd, rev 4.1, january 2012 64 output signal paths enable the output pgas for each analogue output pin can be enabled and disabled using the register bits described in table 38. note that the headphone outputs and line outputs are also controlled by fields located within register r90 and r94, which provide suppressi on of pops & clicks when enabling and disabling these signal paths. these registers are described in the following ?headphone / line output signal paths enable? section. under recommended usage conditions, all the c ontrol bits associated with enabling the headphone outputs and the line outputs will be configured by scheduling the default start-up and shutdown sequences as described in the ?control write sequencer? section. in these cases, the user does not need to set the register fields in r14, r15, r90 and r94 directly. register address bit label default description r14 (0eh) power management 2 1 hpl_pga_ena 0 left headphone output enable 0 = disabled 1 = enabled 0 hpr_pga_ena 0 right headphone output enable 0 = disabled 1 = enabled r15 (0fh) power management 3 1 lineoutl_pga_ ena 0 left line output enable 0 = disabled 1 = enabled 0 lineoutr_pga _ena 0 right line output enable 0 = disabled 1 = enabled table 38 output signal paths enable to enable the output pgas and multiplexers, the reference voltage vmid and the bias current must also be enabled. see ?reference voltages and master bias? for details of the associated controls vmid_res and bias_ena. headphone / line output signal paths enable the output paths can be actively discharged to agnd through internal resistors if desired. this is desirable at start-up in order to achieve a known output stage condition prior to enabling the vmid reference voltage. this is also desirable in shutdown to prevent the external connections from being affected by the internal circuits. the ground-referenced headphone outputs and line outputs are shorted to agnd by default; the short circuit is removed on each of these paths by setting the applicable fields hpl_rmv_short, hpr_rmv_short, lineoutl_rmv_short or lineoutr_rmv_short. the ground-referenced headphone output and line output drivers are designed to suppress pops and clicks when enabled or disabled. however, it is necessary to control the drivers in accordance with a defined sequence in start-up and shutdown to achieve the pop suppression. it is also necessary to schedule the dc servo offset corr ection at the appropriate point in the sequence (see ?dc servo?). table 39 and table 40 describe the recommended sequences for enabling and disabling these output drivers.
production data WM8918 w pd, rev 4.1, january 2012 65 sequence headphone enable lineout enable step 1 hpl_ena = 1 hpr_ena = 1 lineoutl_ena = 1 lineoutr_ena = 1 step 2 hpl_ena_dly = 1 hpr_ena_dly = 1 lineoutl_ena_dly = 1 lineoutr_ena_dly = 1 step 3 dc offset correction dc offset correction step 4 hpl_ena_outp = 1 hpr_ena_outp = 1 lineoutl_ena_outp = 1 lineoutr_ena_outp = 1 step 5 hpl_rmv_short = 1 hpr_rmv_short = 1 lineoutl_rmv_short = 1 lineoutr_rmv_short = 1 table 39 headphone / line output enable sequence sequence headphone disable lineout disable step 1 hpl_rmv_short = 0 hpr_rmv_short = 0 lineoutl_rmv_short = 0 lineoutr_rmv_short = 0 step 2 hpl_ena = 0 hpl_ena_dly = 0 hpl_ena_outp = 0 hpr_ena = 0 hpr_ena_dly = 0 hpr_ena_outp = 0 lineoutl_ena = 0 lineoutl_ena_dly = 0 lineoutl_ena_outp = 0 lineoutr_ena = 0 lineoutr_ena_dly = 0 lineoutr_ena_outp = 0 table 40 headphone / line output disable sequence the registers relating to headphone / line output pop suppression control are defined in table 41. register address bit label default description r90 (5ah) analogue hp 0 7 hpl_rmv_shor t 0 removes hpl short 0 = hpl short enabled 1 = hpl short removed for normal operation, this bit should be set as the final step of the hpl enable sequence. 6 hpl_ena_outp 0 enables hpl output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 5 hpl_ena_dly 0 enables hpl intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after hpl_ena.
WM8918 production data w pd, rev 4.1, january 2012 66 register address bit label default description 4 hpl_ena 0 enables hpl input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the hpl enable sequence. 3 hpr_rmv_sho rt 0 removes hpr short 0 = hpr short enabled 1 = hpr short removed for normal operation, this bit should be set as the final step of the hpr enable sequence. 2 hpr_ena_outp 0 enables hpr output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 1 hpr_ena_dly 0 enables hpr intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after hpr_ena. 0 hpr_ena 0 enables hpr input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the hpr enable sequence.
production data WM8918 w pd, rev 4.1, january 2012 67 register address bit label default description r94 (5eh) analogue lineout 0 7 lineoutl_rmv_ short 0 removes lineoutl short 0 = lineoutl short enabled 1 = lineoutl short removed for normal operation, this bit should be set as the final step of the lineoutl enable sequence. 6 lineoutl_ena_ outp 0 enables lineoutl output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 5 lineoutl_ena_ dly 0 enables lineoutl intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after lineoutl_ena. 4 lineoutl_ena 0 enables lineoutl input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the lineoutl enable sequence. 3 lineoutr_rmv _short 0 removes lineoutr short 0 = lineoutr short enabled 1 = lineoutr short removed for normal operation, this bit should be set as the final step of the lineoutr enable sequence. 2 lineoutr_ena_ outp 0 enables lineoutr output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 1 lineoutr_ena_ dly 0 enables lineoutr intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after lineoutr_ena. 0 lineoutr_ena 0 enables lineoutr input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the lineoutr enable sequence. table 41 headphone / line output pop suppression control
WM8918 production data w pd, rev 4.1, january 2012 68 output mux control by default, the dac outputs are routed directly to the respective output pgas. a multiplexer (mux) is provided on each output path to select the bypassl or bypassr analogue signals from the left/right input pgas in place of the dac outputs. the output multiplexers are configured using the register bits described in table 42. register address bit label default description r61 (3dh) analogue out12 zc 3 hpl_byp_ena 0 selects input for left headphone output mux 0 = left dac 1 = left input pga (analogue bypass) 2 hpr_byp_ena 0 selects input for right headphone output mux 0 = right dac 1 = right input pga (analogue bypass) 1 lineoutl_byp_ ena 0 selects input for left line output mux 0 = left dac 1 = left input pga (analogue bypass) 0 lineoutr_byp_ ena 0 selects input for right line output mux 0 = right dac 1 = right input pga (analogue bypass) table 42 output mux control output volume control each analogue output can be independently controlled. the headphone output control fields are described in table 43. the line output control fields are described in table 44. the output pins are described in more detail in ?analogue outputs?. the volume and mute status of each output can be contro lled individually using the bit fields shown in table 43 and table 44. to prevent ?zipper noise? when a volume adjustment is made, a zero-cross function is provided on all output paths. when this function is enabled, volume updates will not take place until a zero-crossing is detected. in the event of a long period without zero-crossings, a timeout will apply. the timeout must be enabled by setting the toclk_ena bit, as defined in ?clocking and sample rates?. the volume update bits control the loading of the output driver volume data. for example, when hpout_vu is set to 0, the headphone volume data can be loaded into the respective control register, but will not actually change the gain setting. the left and right headphone volume settings are updated when a 1 is written to hpout_vu. this makes it possible to update the gain of a left/right pair of output paths simultaneously.
production data WM8918 w pd, rev 4.1, january 2012 69 register address bit label default description r57 (39h) analogue out1 left 8 hpoutl_mute 0 left headphone output mute 0 = un-mute 1 = mute 7 hpout_vu 0 headphone output volume update writing a 1 to this bit will update hpoutl and hpoutr volumes simultaneously. 6 hpoutlzc 0 left headphone output zero cross enable 0 = disabled 1 = enabled 5:0 hpoutl_vol [5:0] 10_1101 left headphone output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db r58 (3ah) analogue out1 right 8 hpoutr_mute 0 right headphone output mute 0 = un-mute 1 = mute 7 hpout_vu 0 headphone output volume update writing a 1 to this bit will update hpoutl and hpoutr volumes simultaneously. 6 hpoutrzc 0 right headphone output zero cross enable 0 = disabled 1 = enabled 5:0 hpoutr_vol [5:0] 10_1101 right headphone output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db table 43 volume control for hpoutl and hpoutr
WM8918 production data w pd, rev 4.1, january 2012 70 register address bit label default description r59 (3bh) analogue out2 left 8 lineoutl_mute 0 left line output mute 0 = un-mute 1 = mute 7 lineout_vu 0 line output volume update writing a 1 to this bit will update lineoutl and lineoutr volumes simultaneously. 6 lineoutlzc 0 left line output zero cross enable 0 = disabled 1 = enabled 5:0 lineoutl_vol [5:0] 11_1001 left line output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db r60 (3ch) analogue out2 right 8 lineoutr_mut e 0 right line output mute 0 = un-mute 1 = mute 7 lineout_vu 0 line output volume update writing a 1 to this bit will update lineoutl and lineoutr volumes simultaneously. 6 lineoutrzc 0 right line output zero cross enable 0 = disabled 1 = enabled 5:0 lineoutr_vol [5:0] 11_1001 right line output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db table 44 volume control for lineoutl and lineoutr
production data WM8918 w pd, rev 4.1, january 2012 71 analogue outputs the WM8918 has four analogue output pins: ? headphone outputs, hpoutl and hpoutr, with feedback hpoutfb ? line outputs, lineoutl and lineoutr, with feedback lineoutfb the output signal paths and associated control registers are illustrated in figure 37. headphone outputs ? hpoutl and hpoutr the headphone outputs are designed to drive 16 ? or 32 ? headphones. these outputs are ground- referenced, i.e. no series capacitor is required between the pins and the headphone load. they are powered by an on-chip charge pump (see ?charge pump? section). signal volume at the headphone outputs is controlled as shown in table 43. the ground-referenced outputs incorporates a common mode, or ground loop, feedback path which provides rejection of system-related ground noise. the return path for the hpoutl and hpoutr outputs is via hpoutfb. this pin must be connected to ground for normal operation of the headphone output. no register configuration is required. line outputs ? lineoutl and lineoutr the line outputs are identical to the headphone outputs in design. they are ground-referenced and powered by the on-chip charge pump. signal volume at the line outputs is controlled as shown in table 44. note that these outputs are intended for driving line loads, as the charge pump powering both the headphone and line outputs can only provide suffici ent power to drive one set of headphones at any given time. the ground-referenced outputs incorporates a common mode, or ground loop, feedback path which provides rejection of system-related ground noise. the return path for the lineoutl and lineoutr outputs is via lineoutfb. this pin must be connected to ground for normal operation of the line output. no register configuration is required.
WM8918 production data w pd, rev 4.1, january 2012 72 external components for ground referenced outputs it is recommended to connect a zobel network to the ground-referenced outputs hpoutl, hpoutr, lineoutl and lineoutr in order to ensure best audio performance in all applications. the components of the zobel network have the effect of dampening high frequency oscillations or instabilities that can arise outside the audio band under certain conditions. possible sources of these instabilities include the inductive load of a headphone coil or an active load in the form of an external line amplifier. the capacitance of lengthy cables or pcb tracks can also lead to amplifier instability. the zobel network should comprise a 20 ? resistor and 100nf capacitor in series with each other, as illustrated in figure 38. note that the zobel network is recommended for best audio quality and amplifier stability in all cases. figure 38 zobel network components for hpoutl, hpoutr, lineoutl and lineoutr
production data WM8918 w pd, rev 4.1, january 2012 73 reference voltages and master bias this section describes the analogue reference voltage and bias current controls. note that, under the recommended usage conditions of the WM8918, these features will be configured by scheduling the default start-up and shutdown sequences as described in the ?control write sequencer? section. in these cases, the user does not need to set these register fields directly. the analogue circuits in the WM8918 require a mid-rail analogue reference voltage, vmid. this reference is generated from avdd via a programmable resistor chain. vmid is enabled by setting the vmid_ena register bit. the programmable resistor chain is configured by vmid_res [1:0], and can be used to optimise the reference for normal operation, low power standby or for fast start-up as described in table 45. for normal operation, the vmid_res field should be set to 01. the vmid_buf_ena bit allows the buffered vmid reference to be connected to unused inputs/outputs. the analogue circuits in the WM8918 require a bias current. the bias current is enabled by setting bias_ena. note that the bias current source requires vmid to be enabled also. register address bit label default description r5 (05h) vmid control (0) 6 vmid_buf_ ena 0 enable vmid buffer to unused inputs/outputs 0 = disabled 1 = enabled 2:1 vmid_res [1:0] 00 vmid divider enable and select 00 = vmid disabled (for off mode) 01 = 2 x 50k divider (for normal operation) 10 = 2 x 250k divider (for low power standby) 11 = 2 x 5k divider (for fast start-up) 0 vmid_ena 0 enable vmid master bias current source 0 = disabled 1 = enabled r4 (04h) bias control (0) 0 bias_ena 0 enables the normal bias current generator (for all analogue functions) 0 = disabled 1 = enabled table 45 reference voltages and master bias enable
WM8918 production data w pd, rev 4.1, january 2012 74 pop suppression control the WM8918 incorporates wolfson?s silentswitch? technology which enables pops normally associated with start-up, shutdown or signal path control to be suppressed. to achieve maximum benefit from these features, careful attention is required to the sequence and timing of these controls. note that, under the recommended usage conditions of the WM8918, these features will be configured by running the default start-up and shutdown sequences as described in the ?control write sequencer? section. in these cases, the user does not need to set these register fields directly. the pop suppression controls relating to the headphone / line output drivers are described in the ?output signal path? section. disabled input control the analogue inputs to the WM8918 are biased to vmid in normal operation. in order to avoid audible pops caused by a disabled signal path dropping to agnd, the WM8918 can maintain these connections at vmid when the relevant input stage is disabled. this is achieved by connecting a buffered vmid reference to the input. the buffered vmid reference is enabled by setting vmid_buf_ena; when the buffered vmid reference is enabled, it is connected to any unused input pins. register address bit label default description r5 (05h) vmid control 0 6 vmid_buf_ena 0 vmid buffer to unused inputs/outputs 0 = disabled 1 = enabled 0 vmid_ena 0 vmid buffer enable 0 = disabled 1 = enabled table 46 disabled line input control
production data WM8918 w pd, rev 4.1, january 2012 75 charge pump the WM8918 incorporates a dual-mode charge pump which generates the supply rails for the headphone and line output drivers, hpoutl, hpoutr, and lineoutl and lineoutr. the charge pump has a single supply input, cpvdd, and generates split rails cpvoutp and cpvoutn according to the selected mode of operation. the charge pump connections are illustrated in figure 39 (see the ?electrical characteristics? section for external component values). an input decoupling capacitor may also be required at cpvdd, depending upon the system configuration. cpvdd charge pump cpvoutp cpvoutn cpca cpcb cpgnd figure 39 charge pump external connections the charge pump is enabled by setting the cp_ena bit. when enabled, the charge pump adjusts the output voltages (cpvoutp and cpvoutn) as well as the switching frequency in order to optimise the power consumption according to the operating c onditions. this can take two forms, which are selected using the cp_dyn_pwr register bit. ? register control (cp_dyn_pwr = 0) ? dynamic control (cp_dyn_pwr = 1) under register control, the hpoutl_vol, hpoutr_vol, lineoutl_vol and lineoutr_vol register settings are used to control the charge pump mode of operation. under dynamic control, the audio signal level in the dac is used to control the charge pump mode of operation. this is the wolfson ?class w? mode, which allows the power consumption to be optimised in real time, but can only be used if the dac is the only signal source. this mode should not be used if any of the bypass paths are used to feed analogue inputs into the output signal path. under the recommended usage conditions of the WM8918, the charge pump will be enabled by running the default headphone start-up sequence as described in the ?control write sequencer? section. (similarly, it will be disabled by running the shutdown sequence.) in these cases, the user does not need to write to the cp_ena bit. the charge pump operating mode defaults to register control; dynamic control may be selected by setting the cp_dyn_pwr register bit, if appropriate. when digital sidetone is used (see ?digital mixing?), it is recommended that the charge pump operates in register control mode only (cp_dyn_ pwr = 0). this is because the dynamic control mode (class w) does not measure the sidetone signal level and hence the charge pump configuration cannot be optimised for all signal conditions when digital sidetone is enabled; this could lead to signal clipping. note that the charge pump clock is derived from internal clock sysclk; this may be derived from mclk directly or else using the fll output, as determined by the sysclk_src bit. under normal circumstances an external clock signal must be present for the charge pump to function. however, the fll has a free-running mode that does not require an external clock but will generate an internal clock suitable for running the charge pump. the clock division from sysclk is handled transparently by the WM8918 without user intervention, as long as sysclk and sample rates are set correctly.
WM8918 production data w pd, rev 4.1, january 2012 76 refer to the ?clocking and sample rates? section for more detail on the fll and clocking configuration. the charge pump control fields are described in table 47. register address bit label default description r98 (62h) charge pump 0 0 cp_ena 0 enable charge-pump digits 0 = disable 1 = enable r104 (68h) class w (0) 0 cp_dyn_pwr 0 enable dynamic charge pump power control 0 = charge pump controlled by volume register settings (class g) 1 = charge pump controlled by real- time audio level (class w) class w is recommended for lowest power consumption table 47 charge pump control dc servo the WM8918 provides four dc servo circuits, two on the headphone outputs hpoutl and hpoutr and two on the line outputs lineoutl and lineoutr, to remove dc offset from these ground- referenced outputs. when enabled, the dc servos ensure that the dc level of these outputs remains within 1mv of ground. removal of the dc offset is important because any deviation from gnd at the output pin will cause current to flow through the load under quiescent conditions, resulting in increased power consumption. additionally, the pres ence of dc offsets can result in audible pops and clicks at power up and power down. the recommended usage of the dc servo is initialised by running the default start-up sequence as described in the ?control write sequencer? section. the default start-up sequence executes a series of dc offset corrections, after which the measured offset correction is maintained on the headphone output channels. if a different usage is required, e.g. if a periodic dc offset correction is required, then the default start-up sequence may be modified acco rding to specific requirements. the relevant control fields are described in the following paragraphs and are defined in table 48. dc servo enable and start-up the dc servo circuits are enabled on hpoutl and hpoutr by setting dcs_ena_chan_0 and dcs_ena_chan_1 respectively. similarly, the dc servo circuits are enabled on lineoutl and lineoutr by setting dcs_ena_chan_2 and dcs _ena_chan_3 respectively when the dc servo is enabled, the dc offset correction can be commanded in a number of different ways, including single-shot and periodically recurring events. writing a logic 1 to dcs_trig_startup_ n initiates a series of dc offset measurements and applies the necessary correction to the associated output; (?n? = 3 for lineoutr channel, 2 for lineoutl channel, 1 for hpoutr channel, 0 for hpoutl channel). on completion, the output will be within 1mv of agnd. this is the dc servo mode selected by the default start-up sequence. completion of the dc offset correction triggered in this way is indicated by the dcs_startup_complete field, as described in table 48. typically, this operation takes 86ms per channel. writing a logic 1 to dcs_trig_dac_wr_ n causes the dc offset correction to be set to the value contained in the dcs_dac_wr_val_ n fields in registers r73 to r76. this mode is useful if the required offset correction has already been determined and stored; it is faster than the dcs_trig_startup_ n mode, but relies on the accuracy of the stored settings. completion of the dc offset correction triggered in this way is indicated by the dcs_dac_wr_complete field, as described in table 48. typically, this operation takes 2ms per channel.
production data WM8918 w pd, rev 4.1, january 2012 77 when using either of the dc servo options above, the status of the dc offset correction process is indicated by the dcs_cal_complete field; this is the logical or of the dcs_startup_complete and dcs_dac_wr_complete fields. the dc servo control fields associated with s tart-up operation are described in table 48. it is important to note that, to minimise audible pops/clicks, the start-up and dac write modes of dc servo operation should be commanded as part of a control sequence which includes muting and shorting of the headphone outputs; a suitable sequence is defined in the default start-up sequence. register address bit label default description r67 (43h) dc servo 0 3 dcs_ena_chan _3 0 dc servo enable for lineoutr 0 = disabled 1 = enabled 2 dcs_ena_chan _2 0 dc servo enable for lineoutl 0 = disabled 1 = enabled 1 dcs_ena_chan _1 0 dc servo enable for hpoutr 0 = disabled 1 = enabled 0 dcs_ena_chan _0 0 dc servo enable for hpoutl 0 = disabled 1 = enabled r68 (44h) dc servo 1 7 dcs_trig_star tup_3 0 writing 1 to this bit selects start-up dc servo mode for lineoutr. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 6 dcs_trig_star tup_2 0 writing 1 to this bit selects start-up dc servo mode for lineoutl. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 5 dcs_trig_star tup_1 0 writing 1 to this bit selects start-up dc servo mode for hpoutr. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 4 dcs_trig_star tup_0 0 writing 1 to this bit selects start-up dc servo mode for hpoutl. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 3 dcs_trig_dac_ wr_3 0 writing 1 to this bit selects dac write dc servo mode for lineoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 2 dcs_trig_dac_ wr_2 0 writing 1 to this bit selects dac write dc servo mode for lineoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 1 dcs_trig_dac_ wr_1 0 writing 1 to this bit selects dac write dc servo mode for hpoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress.
WM8918 production data w pd, rev 4.1, january 2012 78 register address bit label default description 0 dcs_trig_dac_ wr_0 0 writing 1 to this bit selects dac write dc servo mode for hpoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. r73 (49h) dc servo 6 7:0 dcs_dac_wr_v al_3 [7:0] 0000 0000 dc offset value for lineoutr in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv r74 (4ah) dc servo 7 7:0 dcs_dac_wr_v al_2 [7:0] 0000 0000 dc offset value for lineoutl in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv r75 (4bh) dc servo 8 7:0 dcs_dac_wr_v al1 [7:0] 0000 0000 dc offset value for hpoutr in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv r76 (4ch) dc servo 9 7:0 dcs_dac_wr_v al0 [7:0] 0000 0000 dc offset value for hpoutl in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv
production data WM8918 w pd, rev 4.1, january 2012 79 register address bit label default description r77 (4dh) dc servo readback 0 11:8 dcs_cal_comp lete [3:0] 0000 dc servo complete status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = dac write or start-up dc servo mode not completed. 1 = dac write or start-up dc servo mode complete. 7:4 dcs_dac_wr_c omplete [3:0] 0000 dc servo dac write status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = dac write dc servo mode not completed. 1 = dac write dc servo mode complete. 3:0 dcs_startup_ complete [3:0] 0000 dc servo start-up status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = start-up dc servo mode not completed.. 1 = start-up dc servo mode complete. table 48 dc servo enable and start-up modes dc servo active modes the dc servo modes described above are suitable for initialising the dc offset correction circuit on the line and headphone outputs as part of a controll ed start-up sequence which is executed before the signal path is fully enabled. additional modes are av ailable for use whilst the signal path is active; these modes may be of benefit following a large change in signal gain, which can lead to a change in dc offset level. periodic updates may also be desirable to remove slow drifts in dc offset caused by changes in parameters such as device temperature. the dc servo circuit is enabled on hpoutr and hpoutl by setting dcs_ena_chan_1 and dcs_ena_chan_0 respectively, as described earlier in table 48. similarly, the dc servo circuit is enabled on lineoutr and lineoutl by setting dcs_ena_chan_3 and dcs_ena_chan_2 respectively. writing a logic 1 to dcs_trig_single_ n initiates a single dc offset measurement and adjustment to the associated output; (?n? = 3 for lineoutr channel, 2 for lineoutl channel, 1 for hpoutr channel, 0 for hpoutl channel). this will adjust the dc offset correction on the selected channel by no more than 1lsb (0.25mv). setting dcs_timer_period_01 or dcs_timer_period_23 to a non-zero value will cause a single dc offset measurement and adjustment to be scheduled on a periodic basis. periodic rates ranging from every 0.52s to in excess of 2 hours can be selected.
WM8918 production data w pd, rev 4.1, january 2012 80 writing a logic 1 to dcs_trig_series_ n initiates a series of dc offset measurements and applies the necessary correction to the associated output. the number of dc servo operations performed is determined by dcs_series_no_01 or dcs_series_no_23. a maximum of 128 operations may be selected, though a much lower value will be sufficient in most applications. the dc servo control fields associated with active modes (suitable for use on a signal path that is in active use) are described in table 49. register address bit label default description r68 (44h) dc servo 1 15 dcs_trig_sing le_3 0 writing 1 to this bit selects a single dc offset correction for lineoutr. in readback, a value of 1 indicates that the dc servo single correction is in progress. 14 dcs_trig_sing le_2 0 writing 1 to this bit selects a single dc offset correction for lineoutl. in readback, a value of 1 indicates that the dc servo single correction is in progress. 13 dcs_trig_sing le_1 0 writing 1 to this bit selects a single dc offset correction for hpoutr. in readback, a value of 1 indicates that the dc servo single correction is in progress. 12 dcs_trig_sing le_0 0 writing 1 to this bit selects a single dc offset correction for hpoutl. in readback, a value of 1 indicates that the dc servo single correction is in progress. 11 dcs_trig_seri es_3 0 writing 1 to this bit selects a series of dc offset corrections for lineoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 10 dcs_trig_seri es_2 0 writing 1 to this bit selects a series of dc offset corrections for lineoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 9 dcs_trig_seri es_1 0 writing 1 to this bit selects a series of dc offset corrections for hpoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 8 dcs_trig_seri es_0 0 writing 1 to this bit selects a series of dc offset corrections for hpoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. r71 (47h) dc servo 4 6:0 dcs_series_n o_23 [6:0] 010_1010 number of dc servo updates to perform in a series event for lineoutl/lineoutr. 0 = 1 updates 1 = 2 updates ... 127 = 128 updates
production data WM8918 w pd, rev 4.1, january 2012 81 register address bit label default description r72 (48h) dc servo 5 6:0 dcs_series_n o_01 [6:0] 010 1010 number of dc servo updates to perform in a series event for hpoutl/hpoutr. 0 = 1 updates 1 = 2 updates ... 127 = 128 updates r69 (45h) dc servo 2 11:8 dcs_timer_pe riod_23 [3:0] 1010 time between periodic updates for lineoutl/lineoutr. time is calculated as 0.256s x (2^period) 0000 = off 0001 = 0.52s 1010 = 266s (4min 26s) 1111 = 8519s (2hr 22s) 3:0 dcs_timer_pe riod_01 [3:0] 1010 time between periodic updates for hpoutl/hpoutr. time is calculated as 0.256s x (2^period) 0000 = off 0001 = 0.52s 1010 = 266s (4min 26s) 1111 = 8519s (2hr 22s) table 49 dc servo active modes dc servo readback the current dc offset value for each line and headphone output channel can be read in two?s complement format from the dcs_dac_wr_val_n [7:0] bit fields in registers r73, r74, r75 and r76. note that these values may form the basis of settings that are subsequently used by the dc servo in dac write mode. digital audio interface the digital audio interface is used for i nputting dac data to the WM8918 and outputting digital microphone data from it. the digital audio interface uses four pins: ? aiftxdat: digital microphone data output ? aifrxdat: dac data input ? lrclk: left/right data alignment clock ? bclk: bit clock, for synchronisation the clock signals bclk and lrclk can be outputs when the WM8918 operates as a master, or inputs when it is a slave (see ?master and slave mode operation?, below). four different audio data formats are supported: ? left justified ? right justified ? i2s ? dsp mode
WM8918 production data w pd, rev 4.1, january 2012 82 all four of these modes are msb first. they are described in ?audio data formats (normal mode)?, below. refer to the ?signal timing requirements? section for timing information. time division multiplexing (tdm) is available in all four data format modes. the WM8918 can be programmed to send and receive data in one of two time slots. pcm operation is supported using the dsp mode. master and slave mode operation the WM8918 digital audio interface can operate in master or slave mode, as shown in figure 40 and figure 41. figure 40 master mode figure 41 slave mode in master mode, bclk is derived from sysclk via a programmable division set by bclk_div. in master mode, lrclk is derived from bclk via a programmable division set by lrclk_rate. the bclk input to this divider may be internal or external, allowing mixed master and slave modes. the direction of these signals and the clock frequencies are controlled as described in the ?digital audio interface control? section. bclk and lrclk can be enabled as outputs in slave mode, allowing mixed master/slave operation - see ?digital audio interface control?. operation with tdm time division multiplexing (tdm) allows multiple devices to transfer data simultaneously on the same bus. the WM8918 supports tdm in master and slave modes for all data formats and word lengths. tdm is enabled and configured using register bits defined in the ?digital audio interface control? section.
production data WM8918 w pd, rev 4.1, january 2012 83 WM8918 processor WM8918 or similar codec aiftxdat lrclk aifrxdat bclk aiftxdat lrclk aifrxdat bclk WM8918 processor WM8918 or similar codec aiftxdat lrclk aifrxdat bclk aiftxdat lrclk aifrxdat bclk figure 42 tdm with WM8918 as master figure 43 tdm with other codec as master WM8918 processor WM8918 or similar codec aiftxdat lrclk aifrxdat bclk aiftxdat lrclk aifrxdat bclk figure 44 tdm with processor as master note: the WM8918 is a 24-bit device. if the user operates the WM8918 in 32-bit mode then the 8 lsbs will be ignored on the receiving side and not driven on the transmitting side. it is therefore recommended to add a pull-down resistor if necessary to the aifrxdat line and the aiftxdat line in tdm mode. bclk frequency the bclk frequency is controlled relative to sysc lk by the bclk_div divider. internal clock divide and phase control mechanisms ensure that the bclk and lrclk edges will occur in a predictable and repeatable position relative to each other and relative to the data for a given combination of dac sample rate and bclk_div settings. bclk_div is defined in the ?digital audio interface control? section. see also the ?clocking and sample rates? section for more information.
WM8918 production data w pd, rev 4.1, january 2012 84 audio data formats (normal mode) in right justified mode, the lsb is available on the last rising edge of bclk before a lrclk transition. all other bits are transmitted before (msb first). depending on word length, bclk frequency and sample rate, there may be unused bclk cycles after each lrclk transition. figure 45 right justified audio interface (assuming n-bit word length) in left justified mode, the msb is available on the first rising edge of bclk following a lrclk transition. the other bits up to the lsb are then transmitted in order. depending on word length, bclk frequency and sample rate, there may be unused bclk cycles before each lrclk transition. figure 46 left justified audio interface (assuming n-bit word length) in i 2 s mode, the msb is available on the second risi ng edge of bclk following a lrclk transition. the other bits up to the lsb are then transmitted in order. depending on word length, bclk frequency and sample rate, there may be unused bclk cycles between the lsb of one sample and the msb of the next. figure 47 i2s justified audio interface (assuming n-bit word length)
production data WM8918 w pd, rev 4.1, january 2012 85 in dsp mode, the left channel msb is available on either the 1 st (mode b) or 2 nd (mode a) rising edge of bclk (selectable by aif_lrclk_inv) following a rising edge of lrclk. right channel data immediately follows left channel data. depending on word length, bclk frequency and sample rate, there may be unused bclk cycles between the lsb of the right channel data and the next sample. in device master mode, the lrclk output will resemble the frame pulse shown in figure 48 and figure 49. in device slave mode, figure 50 and figure 51, it is possible to use any length of frame pulse less than 1/fs, providing the falling edge of the frame pulse occurs greater than one bclk period before the rising edge of the next frame pulse. figure 48 dsp mode audio interface (mode a, aif_lrclk_inv=0, master) figure 49 dsp mode audio interface (mode b, aif_lrclk_inv=1, master) figure 50 dsp mode audio interface (mode a, aif_lrclk_inv=0, slave)
WM8918 production data w pd, rev 4.1, january 2012 86 figure 51 dsp mode audio interface (mode b, aif_lrclk_inv=1, slave) pcm operation is supported in dsp interface mode. WM8918 dmic data that is output on the left channel will be read as mono pcm data by the receiving equipment. mono pcm data received by the WM8918 will be treated as left channel data. this data may be routed to the left/right dacs as described in the ?digital mixing? section. audio data formats (tdm mode) tdm is supported in master and slave mode and is enabled by register bits aiftx_tdm and aifrx_tdm. all audio interface data formats support time division multiplexing (tdm) for digital microphone and dac data. two time slots are available (slot 0 and slot 1) , selected by register bits aiftx_tdm_chan and aifrx_tdm_chan which control time slots for the digital microphone data and the dac data. when tdm is enabled, the aiftxdat pin will be tri-stated immediately before and immediately after data transmission, to allow another audio device to drive this signal line for the remainder of the sample period. it is important that two audio devices do not attempt to drive the data pin simultaneously, as this could result in a short circuit. see ?audio interface timing? for details of the aiftxdat output relative to bclk signal. note that it is possible to ensure a gap exists between transmissions by setting the transmitted word length to a value higher than the actual length of the data. for example, if 32-bit word length is selected where only 24-bit data is available, then the WM8918 interface will tri-state after transmission of the 24-bit data; this creates an 8-bit gap after the WM8918?s tdm transmission slot. when tdm is enabled, bclk frequency must be high enough to allow data from both time slots to be transferred. the relative timing of slot 0 and slot 1 depends upon the selected data format as shown in figure 52 to figure 56. figure 52 tdm in right-justified mode
production data WM8918 w pd, rev 4.1, january 2012 87 figure 53 tdm in left-justified mode figure 54 tdm in i 2 s mode figure 55 tdm in dsp mode a figure 56 tdm in dsp mode b
WM8918 production data w pd, rev 4.1, january 2012 88 digital audio interface control the register bits controlling audio data format, word length, left/right channel data source and tdm are summarised in table 50. register address bit label default description r24 (18h) audio interface 0 7 aiftxl_src 0 left digital audio interface source 0 = left dmic data is output on left channel 1 = right dmic data is output on left channel 6 aiftxr_src 1 right digital audio interface source 0 = left dmic data is output on right channel 1 = right dmic data is output on right channel 5 aifrxl_src 0 left dac data source select 0 = left dac outputs left channel data 1 = left dac outputs right channel data 4 aifrxr_src 1 right dac data source select 0 = right dac outputs left channel data 1 = right dac outputs right channel data r25 (19h) audio interface 1 13 aifrx_tdm 0 aifrx tdm enable 0 = normal aifrxdat operation 1 = tdm enabled on aifrxdat 12 aifrx_tdm_ chan 0 aifrx tdm channel select 0 = aifrxdat data input on slot 0 1 = aifrxdat data input on slot 1 11 aiftx_tdm 0 aiftx tdm enable 0 = normal aiftxdat operation 1 = tdm enabled on aiftxdat 10 aiftx_tdm_ chan 0 aiftx tdm channel select 0 = aiftxdat outputs data on slot 0 1 = aiftxdat output data on slot 1 7 aif_bclk_in v 0 bclk invert 0 = bclk not inverted 1 = bclk inverted 4 aif_lrclk_i nv 0 lrc polarity / dsp mode a-b select. right, left and i2s modes ? lrc polarity 0 = not inverted 1 = inverted dsp mode ? mode a-b select 0 = msb is available on 2nd bclk rising edge after lrc rising edge (mode a) 1 = msb is available on 1st bclk rising edge after lrc rising edge (mode b) 3:2 aif_wl [1:0] 10 digital audio interface word length 00 = 16 bits 01 = 20 bits 10 = 24 bits 11 = 32 bits 1:0 aif_fmt [1:0] 10 digital audio interface format 00 = right justified 01 = left justified 10 = i2s 11 = dsp table 50 digital audio interface data control
production data WM8918 w pd, rev 4.1, january 2012 89 note that the WM8918 is a 24-bit device. in 32-bit mode (aif_wl=11), the 8 lsbs are ignored on the receiving side and not driven on the transmitting side. audio interface output tri-state register bit aif_tris can be used to tri-state the audio interface pins as described in table 51. all digital audio interface pins will be tri-stated by this function, regardless of the state of other registers which control these pin configurations. register address bit label default description r25 (19h) audio interface 1 8 aif_tris 0 audio interface tristate 0 = audio interface pins operate normally 1 = tristate all audio interface pins table 51 digital audio interface tri-state control bclk and lrclk control the audio interface can be programmed to operate in master mode or slave mode using the bclk_dir and lrclk_dir register bits. in master mode, the bclk and lrclk signals are generated by the WM8918 when any of the dmics or dacs is enabled. in slave mode, the bclk and lrclk clock outputs are disabled by default to a llow another digital audio interface to drive these pins. it is also possible to force the bclk or lrclk signals to be output using bclk_dir and lrclk_dir, allowing mixed master and slave m odes. the bclk_dir and lrclk_dir fields are defined in table 52. register address bit label default description r25 (19h) audio interface 1 6 bclk_dir 0 audio interface bclk direction 0 = bclk is input 1 = bclk is output r26 (1ah) audio interface 2 4:0 bclk_div [4:0] 0_0100 bclk frequency (master mode) 00000 = sysclk 00001 = sysclk / 1.5 00010 = sysclk / 2 00011 = sysclk / 3 00100 = sysclk / 4 (default) 00101 = sysclk / 5 00110 = sysclk / 5.5 00111 = sysclk / 6 01000 = sysclk / 8 01001 = sysclk / 10 01010 = sysclk / 11 01011 = sysclk / 12 01100 = sysclk / 16 01101 = sysclk / 20 01110 = sysclk / 22 01111 = sysclk / 24 10000 = sysclk / 25 10001 = sysclk / 30 10010 = sysclk / 32 10011 = sysclk / 44 10100 = sysclk / 48
WM8918 production data w pd, rev 4.1, january 2012 90 register address bit label default description r27 (1bh) audio interface 3 11 lrclk_dir 0 audio interface lrclk direction 0 = lrclk is input 1 = lrclk is output 10:0 lrclk_rate [10:0] 000_0100 _0000 lrclk rate (master mode) lrclk clock output = bclk / lrclk_rate integer (lsb = 1) valid range: 8 to 2047 table 52 digital audio interface clock control companding the WM8918 supports a-law and ? -law companding on both transmit (dmic) and receive (dac) sides as shown in table 53. register address bit label default description r24 (18h) audio interface 0 3 aiftx_comp 0 aiftx companding enable 0 = disabled 1 = enabled 2 aiftx_compmod e 0 aiftx companding type 0 = -law 1 = a-law 1 aifrx_comp 0 aifrx companding enable 0 = disabled 1 = enabled 0 aifrx_compmod e 0 aifrx companding type 0 = -law 1 = a-law table 53 companding control companding involves using a piecewise linear approximation of the following equations (as set out by itu-t g.711 standard) for data compression: ? -law (where ? =255 for the u.s. and japan): f(x) = ln( 1 + ? |x|) / ln( 1 + ? ) -1 x 1 a-law (where a=87.6 for europe): f(x) = a|x| / ( 1 + lna) x 1/a f(x) = ( 1 + lna|x|) / (1 + lna) 1/a x 1 the companded data is also inverted as recommended by the g.711 standard (all 8 bits are inverted for ? -law, all even data bits are inverted for a-law). the data will be transmitted as the first 8 msbs of data. companding converts 13 bits ( ? -law) or 12 bits (a-law) to 8 bits using non-linear quantization. this provides greater precision for low amplitude signals than for high amplitude signals, resulting in a greater usable dynamic range than 8 bit linear quantization. the companded signal is an 8-bit word comprising sign (1 bit), exponent (3 bits) and mantissa (4 bits). 8-bit mode is selected whenever aifrx_comp=1 or aiftx_comp=1. the use of 8-bit data allows samples to be passed using as few as 8 bclk cycles per lrclk frame. when using dsp mode b, 8-bit data words may be transferred consecutively every 8 bclk cycles.
production data WM8918 w pd, rev 4.1, january 2012 91 8-bit mode (without companding) may be enabled by setting aifrx_compmode=1 or aiftx_compmode=1, when aifrx_comp=0 and aiftx_comp=0. bit7 bit [6:4] bit [3:0] sign exponent mantissa table 54 8-bit companded word composition u-law companding 0 20 40 60 80 100 120 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 normalised input companded output 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 normalised output figure 57 -law companding a-law companding 0 20 40 60 80 100 120 0 0.2 0.4 0.6 0.8 1 normalised input companded output 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 normalised output figure 58 a-law companding
WM8918 production data w pd, rev 4.1, january 2012 92 loopback setting the loopback register bit enables digital loopback. when this bit is set, the dmic digital data output is routed to the dac digital data input path. the digital audio interface input (aifrxdat) is not used when loopback is enabled. register address bit label default description r24 (18h) audio interface 0 8 loopback 0 digital loopback function 0 = no loopback 1 = loopback enabled (dmic data output is directly input to dac data input). table 55 loopback control note: when the digital sidetone is enabled, dmic data will also be added to dac digital data input path within the digital mixing circuit. this applies regardless of whether loopback is enabled. digital pull-up and pull-down the WM8918 provides integrated pull-up and pull-down resistors on each of the mclk, aifrxdat, lrclk and bclk pins. this provides a flexible capability for interfacing with other devices. each of the pull-up and pull-down resistors can be configured independently using the register bits described in table 56. register address bit label default description r126 (7eh) digital pulls 7 mclk_pu 0 mclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 6 mclk_pd 0 mclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 5 aifrxdat_p u 0 aifrxdat pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 4 aifrxdat_p d 0 aifrxdat pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 3 lrclk_pu 0 lrclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 2 lrclk_pd 0 lrclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 1 bclk_pu 0 bclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 0 bclk_pd 0 bclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled table 56 digital audio interface pull-up and pull-down control
production data WM8918 w pd, rev 4.1, january 2012 93 clocking and sample rates the internal clocks for the WM8918 are all derived from a common internal clock source, sysclk. this clock is the reference for the dacs, dsp core functions, digital audio interface, dc servo control and other internal functions. sysclk can either be derived directly from mclk, or may be generated from a frequency locked loop (fll) using mclk, bclk or lrclk as a reference. many commonly-used audio sample rates can be derived directly from typical mclk frequencies; the fll provides additional flexibility for a wide range of mclk frequencies. to avoid audible glitches, all clock configurations must be set up before enabling playback. the fll can be used to generate a free-running clock in the absence of an external reference source; see ?frequency locked loop (fll)? for further details. the WM8918 supports automatic clocking configuration. the programmable dividers associated with the dacs, dsp core functions and dc servo are configured automatically, with values determined from the clk_sys_rate and sample_rate fields. the user must also configure the opclk (if required), the toclk (if required) and the digital audio interface. oversample rates of 64fs or 128fs are supported (based on a 48khz sample rate). a 256khz clock, supporting a number of internal functions, is derived from sysclk. the dc servo control is clocked from sysclk. a gpio clock, opclk, can be derived from sysclk and output on a gpio pin to provide clocking to other devices. this clock is enabled by opclk_ena and controlled by opclk_div. a slow clock, toclk, is used to de-bounce the button/accessory detect inputs, and to set the timeout period for volume updates when zero-cross detect is used. this clock is enabled by toclk_ena and controlled by toclk_rate, toclk_rate_x4 and toclk_rate_div16. in master mode, bclk is derived from sysclk via a programmable divider set by bclk_div. in master mode, the lrclk is derived from bclk via a programmable divider lrclk_rate. the lrclk can be derived from an internal or external bclk source, allowing mixed master/slave operation. the control registers associated with clocking and sample rates are shown in table 57 to table 61. the overall clocking scheme for the WM8918 is illustrated in figure 59.
WM8918 production data w pd, rev 4.1, january 2012 94 figure 59 clocking overview
production data WM8918 w pd, rev 4.1, january 2012 95 sysclk control the sysclk_src bit is used to select the source for sysclk. the source may be either the mclk input or the fll output. the mclk input can be inverted or non-inverted, as selected by the mclk_inv bit. the selected source may also be adjusted by the mclk_div divider to generate sysclk. these register fields are described in table 57. see ?frequency locked loop (fll)? for more details of the frequency locked loop clock generator. the sysclk signal is enabled by register bit clk_sys_ena. this bit should be set to 0 when reconfiguring clock sources. it is not recommended to change sysclk_src while the clk_sys_ena bit is set. the following operating frequency limits must be observed when configuring sysclk. failure to observe these limits will result in degraded noise performance and/or incorrect dmic/dac functionality. ? sysclk ? 3mhz ? if dac_osr128 = 1 then sysclk ? 6mhz ? if dac_mono = 1, then sysclk ? 64 x fs ? if dac_mono = 0, then sysclk ? 128 x fs ? if dmicl_ena = 1 or dmicr_ena = 1 then sysclk ? 256 x fs note that dac mono mode (dac_mono = 1) is only valid when one or other dac is disabled. if both dacs are enabled, then the minimum sysclk for clocking the dacs is 128 x fs. the sysclk control register fields are defined in table 57. register address bit label default description r22 (16h) clock rates 2 15 mclk_inv 0 mclk invert 0 = mclk not inverted 1 = mclk inverted 14 sysclk_src 0 sysclk source select 0 = mclk 1 = fll output 2 clk_sys_ena 0 system clock enable 0 = disabled 1 = enabled r20 (14h) clock rates 0 0 mclk_div 0 enables divide by 2 on mclk 0 = sysclk = mclk 1 = sysclk = mclk / 2 table 57 mclk and sysclk control control interface clocking register map access is possible with or without a master clock (mclk). however, if clk_sys_ena has been set to 1, then a master clock must be present for control register read/write operations. if clk_sys_ena = 1 and mclk is not present, then register access will be unsuccessful. (note that read/write access to register r22, containing clk_sys_ena, is always possible.) if it cannot be assured that mclk is present when accessing the register map, then it is required to set clk_sys_ena = 0 to ensure correct operation. it is possible to use the WM8918 analogue bypass paths to the differential line outputs (lon/lop and ron/rop) without mclk. note that mclk is always required when using hpoutl, hpoutr, lineoutl or lineoutr.
WM8918 production data w pd, rev 4.1, january 2012 96 clocking configuration the WM8918 supports a wide range of standard audio sample rates from 8khz to 96khz. the automatic clocking configuration simplifies the configuration of the clock dividers in the WM8918 by deriving most of the necessary parameters from a minimum number of user registers. the sample_rate field selects the sample rate, fs, of the dac. the clk_sys_rate field must be set according to the ratio of sysclk to fs. when these fields are set correctly, the sample rate decoder circui t automatically determines the clocking configuration for all other circuits within the WM8918. a high performance mode of dac operation can be selected by setting the dac_osr128 bit; in 48khz sample mode, the dac_osr128 feature results in 128x oversampling. audio performance is improved, but power consumption is also increased. register address bit label default description r33 (21h) dac digital 1 6 dac_osr128 0 dac oversample rate select 0 = low power (normal osr) 1 = high performance (double osr) r21 (15h) clock rates 1 13:10 clk_sys_rat e [3:0] 0011 selects the sysclk / fs ratio 0000 = 64 0001 = 128 0010 = 192 0011 = 256 0100 = 384 0101 = 512 0110 = 768 0111 = 1024 1000 = 1408 1001 = 1536 2:0 sample_rate [2:0] 101 selects the sample rate (fs) 000 = 8khz 001 = 11.025khz, 12khz 010 = 16khz 011 = 22.05khz, 24khz 100 = 32khz 101 = 44.1khz, 48khz 110 to 111 = reserved table 58 automatic clocking configuration control dmic / dac clock control the clocking of the dmic and dac circuits is derived from clk_dsp, which is enabled by clk_dsp_ena. clk_dsp is generated from sysclk which is separately enabled, using the register bit clk_sys_ena. higher performance dac operation can be achieved by increasing the dac oversample rate - see table 58. the dmic / dac clock control registers are defined in table 59. register address bit label default description r22 (16h) clock rates 2 1 clk_dsp_ena 0 dsp clock enable 0 = disabled 1 = enabled table 59 dmic / dac clock control
production data WM8918 w pd, rev 4.1, january 2012 97 opclk control a clock output (opclk) derived from sysclk may be output on a gpio pin. this clock is enabled by register bit opclk_ena, and its frequency is controlled by opclk_div. this output of this clock is also dependent upon the gpio register settings described under ?general purpose input/output (gpio)?. register address bit label default description r22 (16h) clock rates 2 3 opclk_ena 0 gpio clock output enable 0 = disabled 1 = enabled r26 (1ah) audio interface 2 11:8 opclk_div [3:0] 0000 gpio output clock divider 0000 = sysclk 0001 = sysclk / 2 0010 = sysclk / 3 0011 = sysclk / 4 0100 = sysclk / 5.5 0101 = sysclk / 6 0110 = sysclk / 8 0111 = sysclk / 12 1000 = sysclk / 16 1001 to 1111 = reserved table 60 opclk control toclk control a slow clock (toclk) is derived from the internally generated 256khz clock to enable input de- bouncing and volume update timeout functions. this cloc k is enabled by register bit toclk_ena, and its frequency is controlled by toclk_rate and toclk_rate_x4, as described in table 61. register address bit label default description r22 (16h) clock rates 2 12 toclk_rate 0 toclk rate divider (/2) 0 = f / 2 1 = f / 1 0 toclk_ena 0 zero cross timeout enable 0 = disabled 1 = enabled r20 (14h) clock rates 0 14 toclk_rate_ div16 0 toclk rate divider (/16) 0 = f / 1 1 = f / 16 13 toclk_rate_ x4 0 toclk rate multiplier 0 = f x 1 1 = f x 4 table 61 toclk control
WM8918 production data w pd, rev 4.1, january 2012 98 a list of possible toclk rates is provided in table 62. toclk_rate toclk_rate_x4 toclk_rate_div16 toclk freq (hz) period (ms) 1 1 0 1000 1 0 1 0 500 2 1 0 0 250 4 0 0 0 125 8 1 1 1 62.5 16 0 1 1 31.25 32 1 0 1 15.625 64 0 0 1 7.8125 128 table 62 toclk rates dac operation at 88.2k / 96k the WM8918 supports dac operation at 88.2khz and 96k hz sample rates. this section details specific conditions applicable to these oper ating modes. note that digital microphone operation at 88.2khz or 96khz is not possible. for dac operation at 88.2khz or 96khz sample rate s, the available clocking configurations are detailed in table 63. dac operation at these sample rates is achieved by setting the sample_rate field to half the required sample rate (eg. select 48khz for 96khz mode). the digital microphone dsp must be disabled (dmicl_ena = 0 and dmicr_ena = 0). note that the dac_osr128 and eq_ena registers must be set to 0. retune tm mobile can not be used during 88.2khz or 96khz operation. the sysclk frequency is derived from mclk. the maximum mclk frequency is defined in the ?signal timing requirements? section. sample rate register configuration clocking ratio 88.2khz sample_rate = 101 clk_sys_rate = 0001 (sysclk / fs = 128) bclk_div = 00010 lrclk_rate = 040h dac_osr128 = 0 eq_ena = 0 sysclk = 128 x fs 96khz sample_rate = 101 clk_sys_rate = 0001 (sysclk / fs = 128) bclk_div = 00010 lrclk_rate = 040h dac_osr128 = 0 eq_ena = 0 sysclk = 128 x fs table 63 dac operation at 88.2khz and 96khz sample rates
production data WM8918 w pd, rev 4.1, january 2012 99 frequency locked loop (fll) the integrated fll can be used to generate sysclk from a wide variety of different reference sources and frequencies. the fll can use either mclk, bclk or lrclk as its reference, which may be a high frequency (eg. 12.288mhz) or low frequency (eg. 32,768khz) reference. the fll is tolerant of jitter and may be used to generate a stable sysclk from a less stable input signal. the fll characteristics are summarised in ?electrical characteristics?. note that the fll can be used to generate a free-running clock in the absence of an external reference source. this is described in the ?free-running fll clock? section below. the fll is enabled using the fll_ena register bit. note that, when changing fll settings, it is recommended that the digital circuit be disabled via fll_ena and then re-enabled after the other register settings have been updated. when changing the input reference frequency f ref , it is recommended the fll be reset by setting fll_ena to 0. the fll_clk_ref_src field allows mclk, bclk or lrclk to be selected as the input reference clock. the field fll_clk_ref_div provides the option to divide the input reference (mclk, bclk or lrclk) by 1, 2, 4 or 8. this field should be set to bring the reference down to 13.5mhz or below. for best performance, it is recommended that the highest possible frequency - within the 13.5mhz limit - should be selected. the field fll_ctrl_rate controls internal functi ons within the fll; it is recommended that only the default setting be used for this parameter. fll_gain controls the internal loop gain and should be set to the recommended value quoted in table 66. the fll output frequency is directly determined from fll_fratio, fll_outdiv and the real number represented by fll_n and fll_k. the field fll_n is an integer (lsb = 1); fll_k is the fractional portion of the number (msb = 0.5). the fractional portion is only valid in fractional mode when enabled by the field fll_fracn_ena. it is recommended that fll_fracn_ena is enabled at all times. power consumption in the fll is reduced in integer mode; however, the performance may also be reduced, with increased noise or jitter on the output. if low power consumption is required, then fll setti ngs must be chosen when n.k is an integer (ie. fll_k = 0). in this case, the fractional mode c an be disabled by setting fll_fracn_ena = 0. for best fll performance, a non-integer value of n.k is required. in this case, the fractional mode must be enabled by setting fll_fracn_ena = 1. the fll settings must be adjusted, if necessary, to produce a non-integer value of n.k. the fll output frequency is generated according to the following equation: f out = (f vco / fll_outdiv) the fll operating frequency, f vco is set according to the following equation: f vco = (f ref x n.k x fll_fratio) see table 66 for the coding of the fll_outdiv and fll_fratio fields. f ref is the input frequency, as determined by fll_clk_ref_div. f vco must be in the range 90-100 mhz. frequencies outside this range cannot be supported. note that the output frequencies that do not lie within the ranges quoted above cannot be guaranteed across the full range of device operating temperatures.
WM8918 production data w pd, rev 4.1, january 2012 100 in order to follow the above requirements for f vco , the value of fll_outdiv should be selected according to the desired output f out . the divider, fll_outdiv, must be set so that f vco is in the range 90-100mhz. the available divisions are integers from 4 to 64. some typical settings of fll_outdiv are noted in table 64. output frequency f out fll_outdiv 2.8125 mhz - 3.125 mhz 011111 (divide by 32) 3.75 mhz - 4.1667 mhz 011000 (divide by 24) 5.625 mhz - 6.25 mhz 001111 (divide by 16) 11.25 mhz - 12.5 mhz 000111 (divide by 8) 18 mhz - 20 mhz 000100 (divide by 5) 22.5 mhz - 25 mhz 000011 (divide by 4) table 64 selection of fll_outdiv the value of fll_fratio should be selected as described in table 65. reference frequency f ref fll_fratio 1mhz - 13.5mhz 0h (divide by 1) 256khz - 1mhz 1h (divide by 2) 128khz - 256khz 2h (divide by 4) 64khz - 128khz 3h (divide by 8) less than 64khz 4h (divide by 16) table 65 selection of fll_fratio in order to determine the remaining fll parameters, the fll operating frequency, f vco , must be calculated, as given by the following equation: f vco = (f out x fll_outdiv) the value of fll_n and fll_k can then be determined as follows: n.k = f vco / (fll_fratio x f ref ) see table 66 for the coding of the fll_outdiv and fll_fratio fields. note that f ref is the input frequency, after division by fll_clk_ref_div, where applicable. in fll fractional mode, the fractional portion of the n.k multiplier is held in the fll_k register field. this field is coded as a fixed point quantity, where the msb has a weighting of 0.5. note that, if desired, the value of this field may be calculated by multiplying k by 2 16 and treating fll_k as an integer value, as illustrated in the following example: if n.k = 8.192, then k = 0.192 multiplying k by 2 16 gives 0.192 x 65536 = 12582.912 (decimal) apply rounding to the nearest integer = 12583 (decimal) = 3127 (hex) for best performance, fll fractional mode should always be used. therefore, if the calculations yield an integer value of n.k, then it is recommended to adjust fll_outdiv in order to obtain a non- integer value of n.k. care must always be taken to ensure that the fll operating frequency, f vco , is within its recommended limits of 90-100 mhz. the register fields that control the fll are described in table 66. example settings for a variety of reference frequencies and output frequencies are shown in table 68.
production data WM8918 w pd, rev 4.1, january 2012 101 register address bit label default description r116 (74h) fll control 1 2 fll_fracn_e na 0 fll fractional enable 0 = integer mode 1 = fractional mode fractional mode (fll_fracn_ena=1) is recommended in all cases 1 fll_osc_ena 0 fll oscillator enable 0 = disabled 1 = enabled fll_osc_ena must be enabled before enabling fll_ena. note that this field is required for free- running fll modes only. 0 fll_ena 0 fll enable 0 = disabled 1 = enabled fll_osc_ena must be enabled before enabling fll_ena. r117 (75h) fll control 2 13:8 fll_outdiv [5:0] 00_0000 fll fout clock divider 00_0000 = reserved 00_0001 = reserved 00_0010 = reserved 00_0011 = 4 00_0100 = 5 00_0101 = 6 ? 11_1110 = 63 11_1111 = 64 (fout = fvco / fll_outdiv) 6:4 fll_ctrl_rat e [2:0] 000 frequency of the fll control block 000 = fvco / 1 (recommended value) 001 = fvco / 2 010 = fvco / 3 011 = fvco / 4 100 = fvco / 5 101 = fvco / 6 110 = fvco / 7 111 = fvco / 8 recommended that these are not changed from default.
WM8918 production data w pd, rev 4.1, january 2012 102 register address bit label default description 2:0 fll_fratio [2:0] 111 f vco clock divider 000 = divide by 1 001 = divide by 2 010 = divide by 4 011 = divide by 8 1xx = divide by 16 000 recommended for f ref > 1mhz 100 recommended for f ref < 64khz r118 (76h) fll control 3 15:0 fll_k [15:0] 0000h fractional multiply for f ref (msb = 0.5) r119 (77h) fll control 4 14:5 fll_n [9:0] 177h integer multiply for f ref (lsb = 1) 3:0 fll_gain [3:0] 0h gain applied to error 0000 = x 1 (recommended value) 0001 = x 2 0010 = x 4 0011 = x 8 0100 = x 16 0101 = x 32 0110 = x 64 0111 = x 128 1000 = x 256 recommended that these are not changed from default. r120 (78h) fll control 5 4:3 fll_clk_ref_ div [1:0] 00 fll clock reference divider 00 = mclk / 1 01 = mclk / 2 10 = mclk / 4 11 = mclk / 8 mclk (or other input reference) must be divided down to <=13.5mhz. for lower power operation, the reference clock can be divided down further if desired. 1:0 fll_clk_ref_ src [1:0] 00 fll clock source 00 = mclk 01 = bclk 10 = lrclk 11 = reserved table 66 fll register map
production data WM8918 w pd, rev 4.1, january 2012 103 free-running fll clock the fll can generate a clock signal even when no external reference is available. however, it should be noted that the accuracy of this clock is reduced, and a reference source should always be used where possible. note that, in free-running mode, the fll is not sufficiently accurate for hi-fi dac applications. however, the free-running mode is suitable for clocking most other functions, including the write sequencer, charge pump, dc servo and class w output driver. if an accurate reference clock is available at fll start-up, then the fll should be configured as described above. the fll will continue to generate a stable output clock after the reference input is stopped or disconnected. if no reference clock is available at the time of starting up the fll, then an internal clock frequency of approximately 12mhz can be generated by enabling the fll analogue oscillator using the fll_osc_ena register bit, and setting f out clock divider to divide by 8 (fll_outdiv = 07h), as defined in table 66. under recommended operating conditions, the fll output may be forced to approximately 12mhz by then enabling the fll_frc_nco bit and setting fll_frc_nco_val to 19h (see table 67). the resultant sysclk delivers the required clock frequencies for the class w output driver, dc servo, charge pump and other functions. note that the value of fll_frc_nco_val may be adjusted to control f out , but care should be taken to maintain the correct relationship between sysclk and the aforementioned functional blocks. register address bit label default description r248 (f8h) fll nco test 1 5:0 fll_frc_nco_ val [5:0] 01_1001 fll forced oscillator value valid range is 000000 to 111111 0x19h (011001) = 12mhz approx (note that this field is required for free-running fll modes only) r247 (f7h) fll nco test 0 0 fll_frc_nco 0 fll forced control select 0 = normal 1 = fll oscillator controlled by fll_frc_nco_val (note that this field is required for free-running fll modes only) table 67 fll free-running mode in both cases described above, the fll must be selected as the sysclk source by setting sysclk_src (see table 57). note that, in the absence of any reference clock, the fll output is subject to a very wide tolerance. see ?electrical characteristics? for details of the fll accuracy. gpio outputs from fll the WM8918 has an internal signal which indic ates whether the fll lock has been achieved. the fll lock status is an input to the interrupt control circuit and can be used to trigger an interrupt event - see ?interrupts?. the fll lock signal can be output directly on a gpio pin as an external indication of fll lock. see ?general purpose input/output (gpio)? for details of how to configure a gpio pin to output the fll lock signal. the fll clock can be output directly on a gpio pin as a clock signal for other circuits. note that the fll clock may be output even if the fll is not selected as the WM8918 sysclk source. the clocking configuration is illustrated in figure 59. see ?general purpose input/output (gpio)? for details of how to configure a gpio pin to output the fll clock.
WM8918 production data w pd, rev 4.1, january 2012 104 example fll calculation to generate 12.288 mhz output (f out ) from a 12.000 mhz reference clock (f ref ): ? set fll_clk_ref_div in order to generate f ref <=13.5mhz: fll_clk_ref_div = 00 (divide by 1) ? set fll_ctrl_rate to the recommended setting: fll_ctrl_rate = 000 (divide by 1) ? set fll_gain to the recommended setting: fll_gain = 0000 (multiply by 1) ? set fll_outdiv for the required output frequency as shown in table 64:- f out = 12.288 mhz, therefore fll_outdiv = 07h (divide by 8) ? set fll_fratio for the given reference frequency as shown in table 65: f ref = 12mhz, therefore fll_fratio = 0h (divide by 1) ? calculate f vco as given by f vco = f out x fll_outdiv:- f vco = 12.288 x 8 = 98.304mhz ? calculate n.k as given by n.k = f vco / (fll_fratio x f ref ): n.k = 98.304 / (1 x 12) = 8.192 ? determine fll_n and fll_k from the integer and fractional portions of n.k:- fll_n is 8. fll_k is 0.192 ? confirm that n.k is a fractional quantity and set fll_fracn_ena: n.k is fractional. set fll_fracn_ena = 1. note that, if n.k is an integer, then an alternative value of fll_fratio should be selected in order to produce a fractional value of n.k.
production data WM8918 w pd, rev 4.1, january 2012 105 example fll settings table 68 provides example fll settings for generating common sysclk frequencies from a variety of low and high frequency reference inputs. f ref f out fll_clk_ ref_div f vco fll_n fll_k fll_ fratio fll_ outdiv fll_ fracn _ena 32.768 khz 12.288 mhz divide by 1 (0h) 98.304 mhz 187 (0bbh) 0.5 (8000h) 16 (4h) 8 (7h) 1 32.768 khz 11.288576 mhz divide by 1 (0h) 90.308608 mhz 344 (158h) 0.5 (8000h) 8 (3h) 8 (7h) 1 32.768 khz 11.2896 mhz divide by 1 (0h) 90.3168 mhz 344 (158h) 0.53125 (8800h) 8 (3h) 8 (7h) 1 48 khz 12.288 mhz divide by 1 (0h) 98.304 mhz 256 (100h) 0 (0000h) 8 (3h) 8 (7h) 0 12.000 mhz 12.288 mhz divide by 1 (0h) 98.3040 mhz 8 (008h) 0.192 (3127h) 1 (0h) 8 (7h) 1 12.000 mhz 11.289597 mhz divide by 1 (0h) 90.3168 mhz 7 (007h) 0.526398 (86c2h) 1 (0h) 8 (7h) 1 12.288 mhz 12.288 mhz divide by 1 (0h) 98.304 mhz 8 (008h) 0 (0000h) 1 (0h) 8 (7h) 0 12.288 mhz 11.2896 mhz divide by 1 (0h) 90.3168 mhz 7 (007h) 0.35 (599ah) 1 (0h) 8 (7h) 1 13.000 mhz 12.287990 mhz divide by 1 (0h) 98.3040 mhz 7 (007h) 0.56184 (8fd5h) 1 (0h) 8 (7h) 1 13.000 mhz 11.289606 mhz divide by 1 (0h) 90.3168 mhz 6 (006h) 0.94745 (f28ch) 1 (0h) 8 (7h) 1 19.200 mhz 12.287988 mhz divide by 2 (1h) 98.3039 mhz 5 (005h) 0.119995 (1eb8h) 1 (0h) 8 (7h) 1 19.200 mhz 11.289588 mhz divide by 2 (1h) 90.3168 mhz 4 (004h) 0.703995 (b439h) 1 (0h) 8 (7h) 1 table 68 example fll settings
WM8918 production data w pd, rev 4.1, january 2012 106 general purpose inpu t/output (gpio) the WM8918 provides two multi-function pins which can be configured to provide a number of different functions. these are digital input/output pins on the dbvdd power domain. the gpio pins are: ? irq/gpio1 ? bclk/gpio4 each general purpose i/o pin can be configured to be a gpio input or configured as one of a number of output functions. signal de-bouncing can be selected on gpio input pins for use with jack/button detect applications. table 69 lists the functions that are available on each of the gpio pins. gpio pin function gpio pins irq / gpio1 bclk / gpio4 gpio input (including jack/button detect) yes yes gpio output yes yes bclk no yes interrupt (irq) yes yes micbias current detect yes yes micbias short-circuit detect yes yes digital microphone interface (dmic clock output) yes yes fll lock output yes yes fll clock output yes yes table 69 gpio functions available irq/gpio1 the irq/gpio1 pin is configured using the register bits described in table 70. by default, this pin is irq output with pull-down resistor enabled. register address bit label default description r121 (79h) gpio control 1 5 gpio1_pu 0 gpio1 pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 4 gpio1_pd 1 gpio1 pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 3:0 gpio1_sel [3:0] 0100 gpio1 function select 0000 = input pin 0001 = clock output (f=sysclk/opclkdiv) 0010 = logic '0' 0011 = logic '1' 0100 = irq (default) 0101 = fll lock 0110 = mic detect 0111 = mic short 1000 = dmic clock out 1001 = fll clock output 1010 to 1111 = reserved table 70 irq/gpio1 control
production data WM8918 w pd, rev 4.1, january 2012 107 bclk/gpio4 the bclk/gpio4 pin is configured using the register bits described in table 71. by default, this pin provides the bclk function associated with the digital audio interface. the bclk function can operate in slave mode (bclk input) or in master mode (bclk output), depending on the bclk_dir register bit as described in the ?digital audio interface? section. it is possible to configure the bclk/gpio4 pin to provide various gpio functions; in this case, the bclk function is provided using the mclk pin. note that the bclk function is always in slave mode (bclk input) in this mode. to select the gpio4 functions, it is required to set bclk_dir = 0 (see table 52) and to set gpio_bclk_mode_ena = 1 (see table 71 below). in this configuration, the mclk input is used as the bit-clock (bclk) for the digital audio interface. when the bclk/gpio4 pin is configured as gpio4, then the pin function is determined by the gpio_bclk_sel register field. register address bit label default description r124 (7ch) gpio control 4 7 gpio_bclk_mode_ ena 0 selects bclk/gpio4 pin function 0 = bclk/gpio4 is used as bclk 1 = bclk/gpio4 is used as gpio. mclk provides the bclk in the aif in this mode. 3:0 gpio_bclk_sel [3:0] 0000 gpio_bclk function select: 0000 = input pin (default) 0001 = clock output (f=sysclk/opclkdiv) 0010 = logic '0' 0011 = logic '1' 0100 = irq 0101 = fll lock 0110 = mic detect 0111 = mic short 1000 = dmic clock out 1001 = fll clock output 1010 to 1111 = reserved table 71 bclk/gpio4 control
WM8918 production data w pd, rev 4.1, january 2012 108 interrupts the interrupt controller has multiple inputs; these include the gpio input pins and the micbias current detection circuits. any combination of these inputs can be used to trigger an interrupt (irq) event. WM8918 interrupt events may be triggered in res ponse to external gpio inputs, fll lock status, micbias status or write sequencer status. note that the gpio inputs (including gpi7 and gpi8) are only supported as interrupt events when the respec tive pin is configured as a gpio input. there is an interrupt status field associated with each of the irq inputs. these are contained in the interrupt status register (r127), as described in table 72. the status of the irq inputs can be read from this register at any time, or in response to the interrupt output being signalled via a gpio pin. individual mask bits can select or deselect differ ent functions from the interrupt controller. these are listed within the interrupt status mask register (r128), as described in table 73. note that the interrupt status fields remain valid, even when masked, but the masked bits will not cause the interrupt (irq) output to be asserted. the interrupt (irq) output represents the logical ?or? of all unmasked irq inputs. the bits within the interrupt status register (r127) are latching fields and, once set, are not reset until a ?1? is written to the respective register bit in the interrupt status register. the interrupt (irq) output is not reset until each of the unmasked irq inputs has been reset. each of the irq inputs can be individually inverted in the interrupt function, enabling either active high or active low behaviour on each irq input. the polarity inversion is controlled using the bits contained in the interrupt polarity register (r129). each of the irq inputs can be debounced to ensure that spikes and transient glitches do not assert the interrupt output. this is selected using the bits contained in the interrupt debounce register (r130). the WM8918 interrupt controller circuit is illustrated in figure 60. the associated control fields are described in table 72 through to table 75. figure 60 interrupt controller
production data WM8918 w pd, rev 4.1, january 2012 109 register address bit label default description r127 (7fh) interrupt status 10 irq 0 logical or of all other interrupt flags 9 gpio_bclk_eint 0 gpio4 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 8 wseq_eint 0 write sequence interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written. note that the read value of wseq_eint is not valid whilst the write sequencer is busy 5 gpio1_eint 0 gpio1 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 4 gpi8_eint 0 gpi8 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 3 gpi7_eint 0 gpi7 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 2 fll_lock_eint 0 fll lock interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 1 mic_shrt_eint 0 micbias short circuit interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 0 mic_det_eint 0 micbias current detect interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written table 72 interrupt status registers register address bit label default description r128 (80h) interrupt status mask 9 im_gpio_bclk_eint 1 gpio4 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 8 im_wseq_eint 1 write sequencer interrupt mask 0 = do not mask interrupt 1 = mask interrupt 5 im_gpio1_eint 1 gpio1 interrupt mask 0 = do not mask interrupt 1 = mask interrupt
WM8918 production data w pd, rev 4.1, january 2012 110 register address bit label default description 4 im_gpi8_eint 1 gpi8 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 3 im_gpi7_eint 1 gpi7 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 2 im_fll_lock_eint 1 fll lock interrupt mask 0 = do not mask interrupt 1 = mask interrupt 1 im_mic_shrt_eint 1 micbias short circuit interrupt mask 0 = do not mask interrupt 1 = mask interrupt 0 im_mic_det_eint 1 micbias current detect interrupt mask 0 = do not mask interrupt 1 = mask interrupt table 73 interrupt mask registers register address bit label default description r129 (81h) interrupt polarity 9 gpio_bclk_eint_pol 0 gpio4 interrupt polarity 0 = active high 1 = active low 8 wseq_eint_pol 0 write sequencer interrupt polarity 0 = active high (interrupt is triggered when wseq is busy) 1 = active low (interrupt is triggered when wseq is idle) 5 gpio1_eint_pol 0 gpio1 interrupt polarity 0 = active high 1 = active low 4 gpi8_eint_pol 0 gpi8 interrupt polarity 0 = active high 1 = active low 3 gpi7_eint_pol 0 gpi7 interrupt polarity 0 = active high 1 = active low 2 fll_lock_eint_pol 0 fll lock interrupt polarity 0 = active high (interrupt is triggered when fll lock is reached) 1 = active low (interrupt is triggered when fll is not locked) 1 mic_shrt_eint_pol 0 micbias short circuit interrupt polarity 0 = active high 1 = active low
production data WM8918 w pd, rev 4.1, january 2012 111 register address bit label default description 0 mic_det_eint_pol 0 micbias current detect interrupt polarity 0 = active high 1 = active low table 74 interrupt polarity registers register address bit label default description r130 (82h) interrupt debounce 9 gpio_bclk_eint_db 0 gpio4 interrupt debounce 0 = disabled 1 = enabled 8 wseq_eint_db 0 write sequencer interrupt debounce enable 0 = disabled 1 = enabled 5 gpio1_eint_db 0 gpio1 input debounce 0 = disabled 1 = enabled 4 gpi8_eint_db 0 gpi8 input debounce 0 = disabled 1 = enabled 3 gpi7_eint_db 0 gpi7 input debounce 0 = disabled 1 = enabled 2 fll_lock_eint_db 0 fll lock debounce 0 = disabled 1 = enabled 1 mic_shrt_eint_db 0 micbias short circuit interrupt debounce 0 = disabled 1 = enabled 0 mic_det_eint_db 0 micbias current detect interrupt debounce 0 = disabled 1 = enabled table 75 interrupt debounce registers
WM8918 production data w pd, rev 4.1, january 2012 112 using in1l and in1r as interrupt inputs in1l pin has three input functions. ? analogue audio input ? digital microphone input (dmicdat1) ? digital interrupt input (gpi7) in1r pin has three input functions. ? analogue audio input ? digital microphone input (dmicdat2) ? digital interrupt input (gpi8) to use these pins as digital interrupt inputs, they must be enabled using the gpi7_ena and gpi8_ena bits as described in table 76. register address bit label default description r124 (7ch) gpio control 4 9 gpi7_ena 0 gpi7 input enable 0 = disabled 1 = enabled 8 gpi8_ena 0 gpi8 input enable 0 = disabled 1 = enabled table 76 enabling in1l and in1r as interrupts gpi7 and gpi8
production data WM8918 w pd, rev 4.1, january 2012 113 control interface the WM8918 is controlled by writing to registers through a 2-wire serial control interface. readback is available for all registers, including chip id, power management status and gpio status. note that, if it cannot be assured that mclk is pres ent when accessing the register map, then it is required to set clk_sys_ena = 0 to ensure correc t operation. see ?clocking and sample rates? for details of clk_sys_ena. the WM8918 is a slave device on the control interface; sclk is a clock input, while sda is a bi- directional data pin. to allow arbitration of multiple slaves (and/or multiple masters) on the same interface, the WM8918 transmits logic 1 by tri-stating the sda pin, rather than pulling it high. an external pull-up resistor is required to pull the sda line high so that the logic 1 can be recognised by the master. in order to allow many devices to share a single 2-wire control bus, every device on the bus has a unique 8-bit device id (this is not the same as the 8-bit address of each register in the WM8918). the WM8918 device id is 0011 0100 (34h). the lsb of the device id is the read/write bit; this bit is set to logic 1 for ?read? and logic 0 for ?write?. the WM8918 operates as a slave device only. the contr oller indicates the start of data transfer with a high to low transition on sda while sclk remains high. this indicates that a device id, register address and data will follow. the WM8918 responds to the start condition and shifts in the next eight bits on sda (8-bit device id including read/write bi t, msb first). if the device id received matches the device id of the WM8918, then the WM8918 responds by pulling sda low on the next clock pulse (ack). if the device id is not recognised or the r/w bit is set incorrectly, the WM8918 returns to the idle condition and waits for a new start condition and valid address. if the device id matches the device id of the WM8918, the data transfer continues as described below. the controller indicates the end of data transfer with a low to high transition on sda while sclk remains high. after receiving a complete address and data sequence the WM8918 returns to the idle state and waits for another start condition. if a start or stop condition is detected out of sequence at any point during data transfer (i.e. sda c hanges while sclk is high), the device returns to the idle condition. the WM8918 supports the following read and write operations: ? single write ? single read ? multiple write using auto-increment ? multiple read using auto-increment the sequence of signals associated with a single register write operation is illustrated in figure 61. figure 61 control interface register write the sequence of signals associated with a single register read operation is illustrated in figure 62.
WM8918 production data w pd, rev 4.1, january 2012 114 figure 62 control interface register read the control interface also supports other register operations, as listed above. the interface protocol for these operations is summarised below. the terminology used in the following figures is detailed in table 77. note that multiple write and multiple read operations are supported using the auto-increment mode. this feature enables the host processor to access sequential blocks of the data in the WM8918 register map faster than is possible with single register operations. terminology description s start condition sr repeated start a acknowledge (sda low) a not acknowledge (sda high) p stop condition r/w readnotwrite 0 = write 1 = read [white field] data flow from bus master to WM8918 [grey field] data flow from WM8918 to bus master table 77 control interface terminology figure 63 single register write to specified address figure 64 single register read from specified address figure 65 multiple register write to specified address using auto-increment
production data WM8918 w pd, rev 4.1, january 2012 115 sr s a register address (0) a a (1) read from 'register address' msbyte data 0 lsbyte data 0 a a p msbyte data n lsbyte data n a a a msbyte data n-1 lsbyte data n-1 a a read from 'last register address+n' read from 'last register address+n-1' device id rw device id rw figure 66 multiple register read from specified address using auto-increment figure 67 multiple register read from last address using auto-increment control write sequencer the control write sequencer is a programmable unit that forms part of the WM8918 control interface logic. it provides the ability to perform a sequence of register write operations with the minimum of demands on the host processor - the sequence may be initiated by a single operation from the host processor and then left to execute independently. default sequences for start-up and shutdown are provided (see ?default sequences? section). it is recommended that these default sequences are used unless changes become necessary. when a sequence is initiated, the sequencer performs a series of pre-defined register writes. the host processor informs the sequencer of the start index of the required sequence within the sequencer?s memory. at each step of the sequence, the contents of the selected register fields are read from the sequencer?s memory and copied into the WM8918 control registers. this continues sequentially through the sequencer?s memory until an ?end of sequence? bit is encountered; at this point, the sequencer stops and an interrupt status flag is asserted. for cases where the timing of the write sequence is important, a programmable delay c an be set for specific steps within the sequence. note that the control write sequencer?s internal clock is derived from the internal clock sysclk. an external mclk signal must be present when using the control write sequencer, and sysclk must be enabled by setting clk_sys_ena (see ?clocking and sample rates?). the clock division from mclk is handled transparently by the WM8918 wi thout user intervention, as long as mclk and sample rates are set correctly. initiating a sequence the register fields associated with running the control write sequencer are described in table 78. the write sequencer clock is enabled by setting the wseq_ena bit. note that the operation of the control write sequencer also requires the internal clock sysclk to be enabled via the clk_sys_ena (see ?clocking and sample rates?). the start index of the required sequence must be written to the wseq_start_index field. setting the wseq_start bit initiates the sequencer at the given start index.
WM8918 production data w pd, rev 4.1, january 2012 116 the write sequencer can be interrupted by writing a logic 1 to the wseq_abort bit. the current status of the write sequencer can be read using two further register fields - when the wseq_busy bit is asserted, this indicates that the write sequencer is busy. note that, whilst the control write sequencer is running a sequence (indicated by the wseq_busy bit), normal read/write operations to the control registers c annot be supported. (the write sequencer registers and the software reset register can still be accessed when the sequencer is busy.) the index of the current step in the write sequencer can be read from the wseq_current_index field; this is an indicator of the sequencer?s progress. on completion of a sequence, this field holds the index of the last step within the last commanded sequence. when the write sequencer reaches the end of a sequence, it asserts the wseq_eint flag in register r127 (see table 72 within the ?interrupts ? section). this flag can be used to generate an interrupt event on completion of the sequence. note that the wseq_eint flag is asserted to indicate that the wseq is not busy. register address bit label default description r108 (6ch) write sequencer 0 8 wseq_ena 0 write sequencer enable. 0 = disabled 1 = enabled r111 (6fh) write sequencer 3 9 wseq_abort 0 writing a 1 to this bit aborts the current sequence and returns control of the device back to the serial control interface. 8 wseq_start 0 writing a 1 to this bit starts the write sequencer at the memory location indicated by the wseq_start_index field. the sequence continues until it reaches an ?end of sequence? flag. at the end of the sequence, this bit will be reset by the write sequencer. 5:0 wseq_start_ index [5:0] 00_0000 sequence start index. this is the memory location of the first command in the selected sequence. 0 to 31 = ram addresses 32 to 48 = rom addresses 49 to 63 = reserved r112 (70h) write sequencer 4 9:4 wseq_curre nt_index [5:0] 00_0000 sequence current index (read only): this is the location of the most recently accessed command in the write sequencer memory. 0 wseq_busy 0 sequencer busy flag (read only): 0 = sequencer idle 1 = sequencer busy note: it is not possible to write to control registers via the control interface while the sequencer is busy. table 78 write sequencer control - initiating a sequence programming a sequence a sequence consists of write operations to data bits (o r groups of bits) within the control registers. the register fields associated with programming the control write sequencer are described in table 79. for each step of the sequence being programmed, the sequencer index must be written to the wseq_write_index field. the values 0 to 31 correspond to all the available ram addresses within the write sequencer memory. (note that memory addresses 32 to 48 also exist, but these are rom addresses, which are not programmable.)
production data WM8918 w pd, rev 4.1, january 2012 117 having set the index as described above, register r109 must be written to (containing the control register address, the start bit position and the field width applicable to this step of the sequence). also, register r110 must be written to (containing the register data, the end of sequence flag and the delay time required after this step is executed). after writing to these two registers, the next step in the sequence may be programmed by updating wseq_write_index and repeating the procedure. wseq_addr is an 8-bit field containing the control register address in which the data should be written. wseq_data_start is a 4-bit field which identifi es the lsb position within the selected control register to which the data should be written. setti ng wseq_data_start = 0100 will cause 1-bit data to be written to bit 4. with this setting, 4-bit data would be written to bits 7:4 and so on. wseq_data_width is a 3-bit field which i dentifies the width of the data block to be written. this enables selected portions of a control register to be updated without any concern for other bits within the same register, eliminating the need for read-modify-write procedures. values of 0 to 7 correspond to data widths of 1 to 8 respectively. for example, setting wseq_data_width = 010 will cause a 3-bit data block to be written. note that the maximum value of this field corresponds to an 8-bit data block; writing to register fields greater than 8 bits wide must be performed using two separate operations of the control write sequencer. wseq_data is an 8-bit field which contains the data to be written to the selected control register. the wseq_data_width field determines how many of these bits are written to the selected register; the most significant bits (above the number indicated by wseq_data_width) are ignored. wseq_delay is a 4-bit field which controls the waiting time between the current step and the next step in the sequence. the total delay time per step (including execution) is given by: t = k (2 wseq_delay + 8) where k = 62.5 ? s (under recommended operating conditions) this gives a useful range of execution/delay times from 562 ? s up to 2.048s per step. wseq_eos is a 1-bit field which indicates the end of sequence. if this bit is set, then the control write sequencer will automatically stop after this step has been executed. register address bit label default description r108 (6ch) write sequencer 0 4:0 wseq_write _index [4:0] 0_0000 sequence write index. this is the memory location to which any updates to r109 and r110 will be copied. 0 to 31 = ram addresses r109 (6dh) write sequencer 1 14:12 wseq_data_ width [2:0] 000 width of the data block written in this sequence step. 000 = 1 bit 001 = 2 bits 010 = 3 bits 011 = 4 bits 100 = 5 bits 101 = 6 bits 110 = 7 bits 111 = 8 bits 11:8 wseq_data_ start [3:0] 0000 bit position of the lsb of the data block written in this sequence step. 0000 = bit 0 ? 1111 = bit 15 7:0 wseq_addr [7:0] 0000_0000 control register address to be written to in this sequence step.
WM8918 production data w pd, rev 4.1, january 2012 118 register address bit label default description r110 (6eh) write sequencer 2 14 wseq_eos 0 end of sequence flag. this bit indicates whether the control write sequencer should stop after executing this step. 0 = not end of sequence 1 = end of sequence (stop the sequencer after this step). 11:8 wseq_delay [3:0] 0000 time delay after executing this step. total delay time per step (including execution)= 62.5s (2^wseq_delay + 8) 7:0 wseq_data [7:0] 0000_0000 data to be written in this sequence step. when the data width is less than 8 bits, then one or more of the msbs of wseq_data are ignored. it is recommended that unused bits be set to 0. table 79 write sequencer control - programming a sequence note that a ?dummy? write can be inserted into a control sequence by commanding the sequencer to write a value of 0 to bit 0 of register r255 (ffh). this is effectively a write to a non-existent register location. this can be used in order to create placeholders ready for easy adaptation of the sequence. for example, a sequence could be defined to power-up a mono signal path from dacl to headphone, with a ?dummy? write included to leave spac e for easy modification to a stereo signal path configuration. dummy writes can also be used in order to implement additional time delays between register writes. dummy writes are included in the default start-up sequence ? see table 81. in summary, the control register to be written is set by the wseq_addr field. the data bits that are written are determined by a combination of wseq_data_start, wseq_data_width and wseq_data. this is illustrated below for an exam ple case of writing to the vmid_res field within register r5 (05h). in this example, the start position is bit 01 (wseq_data_start = 0001b) and the data width is 2 bits (wseq_data_width = 0001b). with these settings, the control write sequencer would updated the control register r5 [2:1] with the contents of wseq_data [1:0]. b15 b14 b13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00 r5 (05h) vmid control 0 lsb position = b01 wseq_data_start n = 0001 data width = 2 bits wseq_data_width n = 0001 wseq_data n (8 bits) b07 b06 b05 b04 b03 b02 b01 b00 wseq_data_width n = 2 bits. therefore, only the least significant 2 bits are valid. bits 02 to 07 are discarded vmid_res figure 68 control write sequencer example
production data WM8918 w pd, rev 4.1, january 2012 119 default sequences when the WM8918 is powered up, two control write sequences are available through default settings in both ram and rom memory locations. the purpose of these sequences, and the register write required to initiate them, is summarised in table 80. in both cases, a single register write will initiate the sequence. wseq start index wseq finish index purpose to initiate 0 (00h) 22 (16h) start-up sequence write 0100h to register r111 (6fh) 25 (19h) 39 (27h) shutdown sequence write 0119h to register r111 (6fh) table 80 write sequencer default sequences note on shutdown sequence: the instruction at index address 25 (19h) shorts the outputs lineoutl and lineoutr. if the line outputs are not in use at the time the sequence is run, then the sequence could, instead, be started at index address 26. index addresses 0 to 31 may be programmed to users? own settings at any time, as described in ?programming a sequence?. users? own settings remain in memory and are not affected by software resets (i.e. writing to register r0). however, any non-default sequences are lost when the device is powered down. start-up sequence the start-up sequence is initiated by writing 0100h to register r111 (6fh). this single operation starts the control write sequencer at index address 0 (00h) and executes the sequence defined in table 81. for typical clocking configurations with mclk =12.288mhz, this sequence takes approximately 300ms to run. note that, for fast startup, step 18 may be overwritten with dummy data in order to achieve startup within 50ms (see ?quick start-up and shutdown?). wseq index register address width start data delay eos description 0 (00h) r4 (04h) 5 bits bit 0 1ah 0h 0b bias_ena = 0 (delay = 0.5625ms) 1 (01h) r5 (05h) 8 bits bit 0 47h 6h 0b vmid_buf_ena = 1 vmid_res[1:0] = 11b vmid_ena = 1 (delay = 4.5ms) 2 (02h) r5 (05h) 2 bits bit 1 01h 0h 0b vmid_res[1:0] = 01b (delay = 0.5625ms) 3 (03h) r4 (04h) 1 bit bit 0 01h 0h 0b bias_ena = 1 (delay = 0.5625ms) 4 (04h) r14 (0eh) 2 bits bit 0 03h 0h 0b hpl_pga_ena = 1 hpr_pga_ena = 1 (delay = 0.5625ms) 5 (05h) r15 (0fh) 2 bits bit 0 03h 0h 0b lineoutl_pga_ena = 1 lineoutr_pga_ena = 1 (delay = 0.5625ms) 6 (06h) r22 (16h) 1 bit bit 1 01h 0h 0b clk_dsp_ena = 1 (delay = 0.5625ms) 7 (07h) r18 (12h) 2 bits bit 2 03h 5h 0b dacl_ena = 1
WM8918 production data w pd, rev 4.1, january 2012 120 wseq index register address width start data delay eos description dacr_ena = 1 (delay = 2.5ms) 8 (08h) r255 (ffh) 1 bit bit 0 00h 0h 0b dummy write for expansion (delay = 0.5625ms) 9 (09h) r4 (04h) 1 bit bit 4 00h 0h 0b (delay = 0.5625ms) 10 (0ah) r98 (62h) 1 bit bit 0 01h 6h 0b cp_ena = 1 (delay = 4.5ms) 11 (0bh) r255 (ffh) 1 bit bit 0 00h 0h 0b dummy write for expansion (delay = 0.5625ms) 12 (0ch) r90 (5ah) 8 bits bit 0 11h 0h 0b hpl_ena = 1 hpr_ena = 1 (delay = 0.5625ms) 13 (0dh) r94 (5eh) 8 bits bit 0 11h 0h 0b lineoutl_ena = 1 lineoutr_ena = 1 (delay = 0.5625ms) 14 (0eh) r90 (5ah) 8 bits bit 0 33h 0h 0b hpl_ena_dly = 1 hpr_ena_dly = 1 (delay = 0.5625ms) 15 (0fh) r94 (5eh) 8 bits bit 0 33h 0h 0b lineoutl_ena_dly = 1 lineoutr_ena_dly = 1 (delay = 0.5625ms) 16 (10h) r67 (43h) 4 bits bit 0 0fh ch 0b dcs_ena_chan_0 = 1 dcs_ena_chan_1 = 1 dcs_ena_chan_2 = 1 dcs_ena_chan_3 = 1 (delay = 0.5625ms) 17 (11h) r68 (44h) 8 bits bit 0 f0h 0h 0b dcs_trig_startup_0 = 1 dcs_trig_startup_1 = 1 dcs_trig_startup_2 = 1 dcs_trig_startup_3 = 1 (delay = 256.5ms) 18 (12h) r255 (ffh) 1 bit bit 0 00h 0h 0b dummy write for expansion (delay = 0.5625ms) 19 (13h) r90 (5ah) 8 bits bit 0 77h 0h 0b hpl_ena_outp = 1 hpr_ena_outp = 1 (delay = 0.5625ms) 20 (14h) r94 (5eh) 8 bits bit 0 77h 0h 0b lineoutl_ena_outp = 1 lineoutr_ena_outp = 1 (delay = 0.5625ms) 21 (15h) r90 (5ah) 8 bits bit 0 ffh 0h 0b hpl_rmv_short = 1 hpr_rmv_short = 1 (delay = 0.5625ms) 22 (16h) r94 (5eh) 8 bits bit 0 ffh 0h 1b lineoutl_rmv_short = 1 lineoutr_rmv_short = 1 end of sequence 23 (17h) r255 (ffh) 1 bit bit 0 00h 0h 0b spare 24 (18h) r255 (ffh) 1 bit bit 0 00h 0h 0b spare table 81 start-up sequence
production data WM8918 w pd, rev 4.1, january 2012 121 shutdown sequence the shutdown sequence is initiated by writing 0119h to register r111 (6fh). this single operation starts the control write sequencer at index address 25 (19h) and executes the sequence defined in table 82. for typical clocking configurations with mclk =12.288mhz, this sequence takes approximately 350ms to run. wseq index register address width start data delay eos description 25 (19h) r94 (5eh) 8 bits bit 0 77h 0h 0b lineoutl_rmv_short = 0 lineoutr_rmv_short = 0 (delay = 0.5625ms) 26 (1ah) r90 (5ah) 8 bits bit 0 77h 0h 0b hpl_rmv_short = 0 hpr_rmv_short = 0 (delay = 0.5625ms) 27 (1bh) r90 (5ah) 8 bits bit 0 00h 0h 0b hpl_ena_outp = 0 hpl_ena_dly = 0 hpl_ena = 0 hpr_ena_outp = 0 hpr_ena_dly = 0 hpr_ena = 0 (delay = 0.5625ms) 28 (1ch) r94 (5eh) 8 bits bit 0 00h 0h 0b lineoutl_ena_outp = 0 lineoutl_ena_dly = 0 lineoutl_ena = 0 lineoutr_ena_outp = 0 lineoutr_ena_dly = 0 lineoutr_ena = 0 (delay = 0.5625ms) 29 (1dh) r67 (43h) 4 bits bit 0 00h 0h 0b dcs_ena_chan_0 = 0 dcs_ena_chan_1 = 0 dcs_ena_chan_2 = 0 dcs_ena_chan_3 = 0 (delay = 0.5625ms) 30 (1eh) r98 (62h) 1 bit bit 0 00h 0h 0b cp_ena = 0 (delay = 0.5625ms) 31 (1fh) r18 (12h) 2 bits bit 2 00h 0h 0b dacl_ena = 0 dacr_ena = 0 (delay = 0.5625ms) 32 (20h) r22 (16h) 1 bit bit 1 00h 0h 0b clk_dsp_ena = 0 (delay = 0.5625ms) 33 (21h) r14 (0eh) 2 bits bit 0 00h 0h 0b hpl_pga_ena = 0 hpr_pga_ena = 0 (delay = 0.5625ms) 34 (22h) r15 (0fh) 2 bits bit 0 00h 0h 0b lineoutl_pga_ena = 0 lineoutr_pga_ena = 0 (delay = 0.5625ms) 35 (23h) r4 (04h) 1 bit bit 0 00h 0h 0b bias_ena = 0 (delay = 0.5625ms) 36 (24h) r5 (05h) 1 bit bit 0 00h ch 0b vmid_ena = 0 (delay = 256.5ms) 37 (25h) r5 (05h) 1 bit bit 0 00h 9h 0b vmid_ena = 0 (delay = 32.5ms) 38 (26h) r5 (05h) 8 bits bit 0 00h 0h 0b vmid_buf_ena = 0
WM8918 production data w pd, rev 4.1, january 2012 122 wseq index register address width start data delay eos description vmid_res[1:0] = 00 vmid_ena = 0 (delay = 0.5625ms) 39 (27h) r4 (04h) 2 bits bit 0 00h 0h 1b bias_ena = 0 end of sequence table 82 shutdown sequence
production data WM8918 w pd, rev 4.1, january 2012 123 power-on reset the WM8918 includes an internal power-on-reset (por ) circuit, which is used to reset the digital logic into a default state after power up. the por circuit is powered from avdd and monitors dcvdd. the internal por signal is asserted low when avdd or dcvdd are below minimum thresholds. the specific behaviour of the circuit will vary, depending on the relative timing of the supply voltages. typical scenarios are illustrated in figure 69 and figure 70. dcvdd v pord_on 0v avdd 0v v pora v pora_off lo hi internal por device ready por active por active por undefined figure 69 power on reset timing - avdd enabled first dcvdd 0v avdd 0v v pora v pord_off lo hi internal por device ready v pora_on por active por active por undefined figure 70 power on reset timing - dcvdd enabled first
WM8918 production data w pd, rev 4.1, january 2012 124 the por signal is undefined until avdd has exceeded the minimum threshold, v pora once this threshold has been exceeded, por is asserted low and the chip is held in reset. in this condition, all writes to the control interface are ignored. once avdd and dcvdd have reached their respective power on thresholds, por is released high, all registers are in their default state, and writes to the control interface may take place. note that a minimum power-on reset period, t por , applies even if avdd and dcvdd have zero rise time. (this specification is guaranteed by design rather than test.) on power down, por is asserted low when any of avdd or dcvdd falls below their respective power-down thresholds. typical power-on reset parameters for the WM8918 are defined in table 83. symbol description typ unit v pora avdd threshold below which por is undefined 0.25 v v pora_on power-on threshold (avdd) 1.15 v v pora_off power-off threshold (avdd) 1.12 v v pord_on power-on threshold (dcvdd) 0.57 v v pord_off power-off threshold (dcvdd) 0.55 v t por minimum power-on reset period 9.5 ? s table 83 typical power-on reset parameters notes: 1. if avdd and dcvdd suffer a brown-out (i.e. drop below the minimum recommended operating level but do not go below v pora_off or v pord_off ) then the chip does not reset and resumes normal operation when the voltage is back to the recommended level again. 2. the chip enters reset at power down when avdd or dcvdd falls below v pora_off or v pord_off . this may be important if the supply is turned on and off frequently by a power management system. 3. the minimum t por period is maintained even if dcvdd and avdd have zero rise time. this specification is guaranteed by design rather than test.
production data WM8918 w pd, rev 4.1, january 2012 125 quick start-up and shutdown the WM8918 has the capability to perform a quick start-up and shutdown with a minimum number of register operations. this is achieved using the control write sequencer, which is configured with default start-up settings that set up the device for dac playback via headphone and line output. assuming a 12.288mhz external clock, the star t-up sequence configures the device for 48khz playback mode. the default start-up sequence requires three register write operations. the default shutdown sequence requires just a single register write. the minimum procedure for executing the quick start- up and shutdown sequences is described below. see ?control write sequencer? for more details. after the default start-up sequence has been performed, the dc offset correction values will be held in memory, provided that power is maintained and a software reset is not performed. fast start-up using the stored values of dc offset correction is also possible, as described below. quick start-up (default sequence) an external clock must be applied to mclk. assuming 12.288mhz input clock, the start-up sequence will take approximately 300ms to complete. the following register operations will initiate the quick start-up sequence. register address value description r108 (6ch) write sequencer 0 0100h wseq_ena = 1 wseq_write_index = 00h this enables the write sequencer r111 (6fh) write sequencer 3 0100h wseq_abort = 0 wseq_start = 1 wseq_start_index = 00h this starts the write sequencer at index address 0 (00h) r33 (21h) dac digital 1 0000h dac_mono = 0 dac_sb_filt = 0 dac_muterate = 0 dac_unmute_ramp = 0 dac_osr128 = 0 dac_mute = 0 deemph = 00 this un-mutes the dacs table 84 quick start-up control the wseq_busy bit (in register r112, see table 78) will be set to 1 while the sequence runs. when this bit returns to 0, the device has been set up and is ready for dac playback operation. fast start-up from standby the default start-up sequence runs the dc serv o to remove dc offsets from the outputs. the offset for this path selection is then stored in memory. provided that power is maintained to the chip, and a software reset is not performed, then the dc offset correction will be held in memory on the WM8918. this allows the dc servo calibrations to be omitted from the start-up sequence if the offset correction has already been performed. by omitting this part of the start-up sequence, a fast start-up time of less than 50ms can be achieved. the register write sequence described in tabl e 85 replaces the default dc servo operation with dummy operations, allowing a fast start-up to be achieved, assuming the device is initially in a standby condition with dc offset correction previously performed.
WM8918 production data w pd, rev 4.1, january 2012 126 note that, if power is removed from the WM8918 or if a software reset is performed, then the default sequence will be restored, and the dc offset correction will be necessary on the output paths once more. register address value description r108 (6ch) write sequencer 0 0111h wseq_ena = 1 wseq_write_index = 11h this enables the write sequencer and selects wseq index 17 (11h) for modification r109 (6dh) write sequencer 1 00ffh wseq_data_width = 000 wseq_data_start = 0000 wseq_addr = ffh this modifies wseq index 17 (11h) with dummy step r110 (6eh) write sequencer 2 0000h wseq_eos = 0 wseq_delay = 0000 wseq_data = 00h this modifies wseq index 17 (11h) with dummy step r111 (6fh) write sequencer 3 0100h wseq_abort = 0 wseq_start = 1 wseq_start_index = 00h this starts the write sequencer at index address 0 (00h) r33 (21h) dac digital 1 0000h dac_mono = 0 dac_sb_filt = 0 dac_muterate = 0 dac_unmute_ramp = 0 dac_osr128 = 0 dac_mute = 0 deemph = 00 this un-mutes the dacs table 85 fast start-up from standby control the wseq_busy bit (in register r112, see table 78) will be set to 1 while the sequence runs. when this bit returns to 0, the device has been set up and is ready for dac playback operation. quick shutdown (default sequence) the default shutdown sequence assumes the initial device conditions are as configured by the default start-up sequence. assuming 12.288mhz input clock, the shutdown sequence will take approximately 350ms to complete. the following register operation will initiate the default shutdown sequence. register address value description r111 (6fh) write sequencer 3 0119h wseq_abort = 0 wseq_start = 1 wseq_start_index = 19h this starts the write sequencer at index address 25 (19h) table 86 quick shutdown control the wseq_busy bit (in register r112, see tabl e 78) will be set to 1 while the sequence runs. when this bit returns to 0, the system clock can be disabled (clk_sys_ena=0) and mclk can be stopped.
production data WM8918 w pd, rev 4.1, january 2012 127 software reset and chip id a software reset can be commanded by writing to register r0. this is a read-only register field and the contents will not be affected by writing to this register. the chip id can be read back from register r0. register address bit label default description r0 (00h) sw reset and id 15:0 sw_rst_de v_id1 [15:0] 8904h writing to this register resets all registers to their default state. reading from this register will indicate device id 8904h. table 87 software reset and chip id
WM8918 production data w pd, rev 4.1, january 2012 128 register map d e c a d d r h e x a d d r n a m e 1 51 41 31 21 11 09876543210 b i n d e f a u l t 0 00 sw reset and id 1000_1001_0000_0100 40 4b i a s c o n t r o l 0 000000000001100b i a s _ e n a0 0 0 0 _ 0 0 0 0 _ 0 0 0 1 _ 1 0 0 0 50 5v m i d c o n t r o l 0 000000000 vmid_buf_ena 0 0 0 vmid_ena 0000_0000_0000_0000 60 6m i c b i a s c o n t r o l 0 000000000 micdet_ena micbias_ena 0000_0000_0000_0000 70 7m i c b i a s c o n t r o l 1 0000000000000 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 1 00 aa n a l o g u e d m i c 0 000000000000000d m i c _ o s r 1 2 80 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 1 1 20 cp o w e r m a n a g e m e n t 000000000000000i n l _ e n ai n r _ e n a0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 1 40 ep o w e r m a n a g e m e n t 200000000000000 hpl_pga_en a hpr_pga_en a 0000_0000_0000_0000 1 50 fp o w e r m a n a g e m e n t 300000000000000 lineoutl_pg a_ena lineoutr_p ga_ena 0000_0000_0000_0000 1 81 2p o w e r m a n a g e m e n t 6000000000000d a c l _ e n ad a c r _ e n ad m i c l _ e n a d m i c r _ e n a0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 20 14 clock rates 0 1 toclk_rate _div16 toclk_rate _x4 011000101111m c l k _ d i v1 0 0 0 _ 1 1 0 0 _ 0 1 0 1 _ 1 1 1 0 21 15 clock rates 1 0 0 0000000 0 0 0 0 _ 1 1 0 0 _ 0 0 0 0 _ 0 1 0 1 2 21 6c l o c k r a t e s 2m c l k _ i n v s y s c l k _ s r c0t o c l k _ r a t e00000000o p c l k _ e n a clk_sys_en a clk_dsp_en a toclk_ena 0000_0000_0000_0000 24 18 audio interface 0 0 0 0 aifrxl_dati nv aifrxr_dati nv loopback aiftxl_src aiftxr_src aifrxl_src aifrxr_src aiftx_comp aiftx_comp mode aifrx_comp aifrx_comp mode 0000_0000_0101_0000 25 19 audio interface 1 0 0 aifrx_tdm aifrx_tdm_cha n aiftx_tdm aiftx_tdm_cha n 0 aif_tris aif_bclk_inv bclk_dir 0 aif_lrclk_in v 0000_0000_0000_1010 26 1a audio interface 2 0 0 0 0 111 0000_0000_1110_0100 27 1b audio interface 3 0 0 0 0 lrclk_dir 0000_0000_0100_0000 3 01 ed a c d i g i t a l v o l u m e l e f t0000000d a c _ v u 0000_000p_1100_0000 31 1f dac digital volume right 0000000d a c _ v u 0000_000p_1100_0000 32 20 dac digital 0 0 0 0 0 0000_0000_0000_0000 33 21 dac digital 1 0 0 0 dac_mono dac_sb_filt dac_mutera te dac_unmute _ramp 0 0 dac_osr128 0 0 dac_mute 0 0000_0000_0000_1000 3 62 4d m i c d i g i t a l v o l u m e l e f t0000000d m i c _ v u 0000_000p_1100_0000 37 25 dmic digital volume right 0000000d m i c _ v u 0000_000p_1100_0000 3 82 6d m i c d i g i t a l 0 000000000 d m i c _ h p f00 aiftxl_datin v aiftxr_dati nv 0000_0000_0001_0000 3 92 7d i g i t a l m i c r o p h o n e 0000d m i c _ e n ad m i c _ s r c00000000000 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 40 28 drc 0 drc_ena drc_dac_pa th 0 drc_ff_del ay 0 drc_gs_ena drc_qr drc_anticli p drc _gs_hys t 0000_0001_1010_1111 41 29 drc 1 0011_0010_0100_1000 4 22 ad r c 2 0000000000 0000_0000_0000_0000 4 32 bd r c 3 00000 0000_0000_0000_0000 4 42 ca n a l o g u e l e f t i n p u t 000000000l i n m u t e00 0000_0000_1000_0101 4 52 da n a l o g u e r i g h t i n p u t 000000000r i n m u t e00 0000_0000_1000_0101 lrclk_rate[10:0] dmicl_vol[7:0] drc_qr_dcy[1:0] drc_knee_op[4:0] rin_vol[4:0] drc_hi_comp[2:0] drc_atk[3:0] drc_dcy[3:0] drc_maxgain[1:0] drc_knee_ip[5:0] drc_mingain[1:0] drc_qr_thr[1:0] drc_lo_comp[2:0] lin_vol[4:0] deemph[1:0] aif_wl[1:0] dacr_vol[7:0] dacl_vol[7:0] opclk_div[3:0] bclk_div[4:0] sw_rst_dev_id1[15:0] vmid_res[1:0] micshort_thr[1:0] micdet_thr[2:0] micbias_sel[2:0] clk_sys_rate[3:0] aif_fmt[1:0] dac_boost[1:0] sample_rate[2:0] dmicl_dac_svol[3:0] drc_startup_gain[4:0] dmicr_dac_svol[3:0] drc_gs_hyst_lvl[1:0] dmic_to_dacr[1:0] dmic_to_dacl[1:0] dmic_hpf_cut[1:0] dmicr_vol[7:0]
production data WM8918 w pd, rev 4.1, january 2012 129 d e c a d d r h e x a d d r n a m e 1 51 41 31 21 11 09876543210 b i n d e f a u l t 46 2e analogue left input 1 0 0 0000000i n l _ c m _ e n a 0000_0000_0100_0100 4 72 fa n a l o g u e r i g h t i n p u t 1000000000i n r _ c m _ e n a 0000_0000_0100_0100 5 73 9a n a l o g u e o u t 1 l e f t0000000 hpoutl_mute hpout_vu hpoutlzc 0000_0000_p010_1101 5 83 aa n a l o g u e o u t 1 r i g h t0000000 hpoutr_mute hpout_vu hpoutrzc 0000_0000_p010_1101 5 93 ba n a l o g u e o u t 2 l e f t0000000 lineoutl_mute lineout_vu lineoutlzc 0000_0000_p011_1001 6 03 ca n a l o g u e o u t 2 r i g h t0000000 lineoutr_mute lineout_vu lineoutrzc 0000_0000_p011_1001 6 13 da n a l o g u e o u t 1 2 z c000000000000 hpl_byp_en a hpr_byp_en a lineoutl_by p_ena lineoutr_by p_ena 0000_0000_0000_0000 6 74 3d c s e r v o 0 000000000000 dcs_ena_ch an_3 dcs_ena_ch an_2 dcs_ena_ch an_1 dcs_ena_ch an_0 0000_0000_0000_0000 68 44 dc servo 1 dcs_trig_si ngle_3 dcs_trig_si ngle_2 dcs_trig_si ngle_1 dcs_trig_si ngle_0 dcs_trig_se ries_3 dcs_trig_se ries_2 dcs_trig_se ries_1 dcs_trig_se ries_0 dcs_trig_st artup_3 dcs_trig_st artup_2 dcs_trig_st artup_1 dcs_trig_st artup_0 dcs_trig_d ac_wr_3 dcs_trig_d ac_wr_2 dcs_trig_d ac_wr_1 dcs_trig_d ac_wr_0 pppp_pppp_pppp_pppp 69 45 dc servo 2 0 0 0 0 1010 1010_1010_1010_1010 7 14 7d c s e r v o 4 000000000 1010_1010_1010_1010 7 24 8d c s e r v o 5 000000000 1010_1010_1010_1010 7 34 9d c s e r v o 6 00000000 0000_0000_0000_0000 7 44 ad c s e r v o 7 00000000 0000_0000_0000_0000 7 54 bd c s e r v o 8 00000000 0000_0000_0000_0000 7 64 cd c s e r v o 9 00000000 0000_0000_0000_0000 77 4d dc servo readback 0 0 0 0 0 0000_0000_0000_0000 9 05 aa n a l o g u e h p 0 00000000 hpl_rmv_sh ort hpl_ena_ou tp hpl_ena_dl y hpl_ena hp r_rmv_sh ort hpr_ena_ou tp hpr_ena_dl y hpr_ena 0000_0000_0000_0000 9 45 ea n a l o g u e l i n e o u t 000000000 lineoutl_rm v_short lineoutl_en a_outp lineoutl_en a_dly lineoutl_en a lineoutr_r mv_short lineoutr_e na_outp lineoutr_e na_dly lineoutr_e na 0000_0000_0000_0000 9 86 2c h a r g e p u m p 0 000000000000000c p _ e n a0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 104 68 c l a s s w 0 0000000000000 1 0 cp_dyn_pwr 0000_0000_0000_0100 1 0 86 cw r i t e s e q u e n c e r 00000000w s e q _ e n a000 0000_0000_0000_0000 109 6d write sequencer 1 0 0000_0000_0000_0000 110 6e write sequencer 2 0 wseq_eos 0 0 0000_0000_0000_0000 1 1 16 fw r i t e s e q u e n c e r 3000000 wseq_abor t wseq_star t 00 0000_0000_0000_0000 1 1 27 0w r i t e s e q u e n c e r 4000000 0 0 0 wseq_busy 0000_0000_0000_0000 1 1 67 4f l l c o n t r o l 1 0000000000000 fll_fracn_ena fll_osc_ena fll_ena 0000_0000_0000_0000 117 75 fll control 2 0 0 0 0 0000_0000_0000_0111 118 76 fll control 3 0000_0000_0000_0000 119 77 fll control 4 0 0 0010_1110_1110_0000 1 2 07 8f l l c o n t r o l 5 00000000000 1 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 1 0 0 fll_clk_ref_div[1:0] fll_clk_ref_src[1:0] dcs_dac_wr_val_2[7:0] fll_ctrl_rate[2:0] fll_fratio[2:0] fll_k[15:0] fll_outdiv[5:0] wseq_data_width[2:0] wseq_data[7:0] wseq_data_start[3:0] wseq_start_index[5:0] fll_gain[3:0] dcs_series_no_23[6:0] l_mode[1:0] dcs_timer_period_01[3:0] hpoutl_vol[5:0] hpoutr_vol[5:0] dcs_timer_period_23[3:0] r_ip_sel_p[1:0] r_ip_sel_n[1:0] lineoutl_vol[5:0] dcs_series_no_01[6:0] dcs_dac_wr_val_3[7:0] dcs_dac_wr_val_1[7:0] r_mode[1:0] l_ip_sel_p[1:0] l_ip_sel_n[1:0] lineoutr_vol[5:0] wseq_delay[3:0] fll_n[9:0] wseq_current_index[5:0] wseq_write_index[4:0] wseq_addr[7:0] dcs_dac_wr_val_0[7:0] dcs_dac_wr_complete[3:0] dcs_cal_complete[3:0] dcs_startup_complete[3:0]
WM8918 production data w pd, rev 4.1, january 2012 130 d e c a d d r h e x a d d r n a m e 1 51 41 31 21 11 09876543210 b i n d e f a u l t 121 79 gpio control 1 0000 000000 gpio1_pu gpio1_pd 0000_0000_0001_0100 124 7c gpio control 4 0000 0 0 gpi7_ena gpi8_ena gpio_bclk_ mode_ena 000 0000_0000_0000_0000 1 2 67 ed i g i t a l p u l l s 00000000m c l k _ p um c l k _ p d a i f r x d a t _ p u a i f r x d a t _ p d l r c l k _ p ul r c l k _ p db c l k _ p ub c l k _ p d0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 127 7f interrupt status 0 0 0 0 0 irq gpio_bclk_e int wseq_eint 0 0 gpio1_eint gpi8_eint gpi7_eint fll_lock_ei nt mic_shrt_ei nt mic_det_ein t xxxx_xppp_pppp_pppp 1 2 88 0i n t e r r u p t s t a t u s m a s k000000 im_gpio_bcl k_eint im_wseq_ein t 11 im_gpio1_ein t im_gpi8_eint im_gpi7_eint im_fll_lock _eint im_mic_shrt _eint im_mic_det_ eint 1111_1111_1111_1111 1 2 98 1i n t e r r u p t p o l a r i t y 000000 gpio_bclk_e int_pol wseq_eint_ pol 00 gpio1_eint_ pol gpi8_eint_p ol gpi7_eint_p ol fll_lock_ei nt_pol mic_shrt_ei nt_pol mic_det_ein t_pol 0000_0000_0000_0000 1 3 08 2i n t e r r u p t d e b o u n c e000000 gpio_bclk_e int_db wseq_eint_ db 00 gpio1_eint_ db gpi8_eint_d b gpi7_eint_d b fll_lock_ei nt_db mic_shrt_ei nt_db mic_det_ein t_db 0000_0000_0000_0000 1 3 48 6e q 1 000000000000000e q _ e n a0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 _ 0 0 0 0 1 3 58 7e q 2 00000000000 0000_0000_0000_1100 1 3 68 8e q 3 00000000000 0000_0000_0000_1100 1 3 78 9e q 4 00000000000 0000_0000_0000_1100 1 3 88 ae q 5 00000000000 0000_0000_0000_1100 1 3 98 be q 6 00000000000 0000_0000_0000_1100 140 8c eq7 0000_1111_1100_1010 141 8d eq8 0000_0100_0000_0000 142 8e eq9 0000_0000_1101_1000 143 8f eq10 0001_1110_1011_0101 144 90 eq11 1111_0001_0100_0101 145 91 eq12 0000_1011_0111_0101 146 92 eq13 0000_0001_1100_0101 14 7 93 eq14 0001_1100_0101_1000 148 94 eq15 1111_0011_0111_0011 149 95 eq16 0000_1010_0101_0100 150 96 eq17 0000_0101_0101_1000 151 97 eq18 0001_0110_1000_1110 152 98 eq19 1111_1000_0010_1001 153 99 eq20 0000_0111_1010_1101 154 9a eq21 0001_0001_0000_0011 155 9b eq22 0000_0101_0110_0100 156 9c eq23 0000_0101_0101_1001 157 9d eq24 0100_0000_0000_0000 eq_b4_pg[15:0] eq_b5_b[15:0] eq_b5_pg[15:0] eq_b4_c[15:0] eq_b5_gain[4:0] eq_b1_a[15:0] gpio_bclk_sel[3:0] eq_b3_a[15:0] eq_b2_b[15:0] eq_b2_c[15:0] eq_b3_gain[4:0] eq_b4_gain[4:0] eq_b1_pg[15:0] eq_b2_pg[15:0] eq_b1_gain[4:0] eq_b2_gain[4:0] eq_b1_b[15:0] eq_b3_c[15:0] eq_b3_b[15:0] eq_b2_a[15:0] gpio1_sel[3:0] eq_b4_a[15:0] eq_b4_b[15:0] eq_b3_pg[15:0] eq_b5_a[15:0]
production data WM8918 w pd, rev 4.1, january 2012 131 dec addr hex addr name 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 bin default 2 4 7f 7f l l n c o t e s t 0 000000000000000 fll_frc_nco 0000_0000_0000_0000 248 f8 fll nco test 1 0 0 0 0 0 0 0 0 0 0 0000_0000_0001_1001 fll_frc_nco_val[5:0]
WM8918 production data w pd, rev 4.1, january 2012 132 register bits by address register address bit label default description refer to r0 (00h) sw reset and id 15:0 sw_rst_dev _id1[15:0] 1000_1001 _0000_010 0 writing to this register resets all registers to their default state. reading from this register will indicate device id 8904h. register 00h sw reset and id register address bit label default description refer to r4 (04h) bias control 0 0 bias_ena 0 enables the normal bias current generator (for all analogue functions) 0 = disabled 1 = enabled register 04h bias control 0 register address bit label default description refer to r5 (05h) vmid control 0 6 vmid_buf_en a 0 enable vmid buffer to unused inputs/outputs 0 = disabled 1 = enabled 2:1 vmid_res[1:0 ] 00 vmid divider enable and select 00 = vmid disabled (for off mode) 01 = 2 x 50k divider (for normal operation) 10 = 2 x 250k divider (for low power standby) 11 = 2 x 5k divider (for fast start-up) 0 vmid_ena 0 enable vmid master bias current source 0 = disabled 1 = enabled register 05h vmid control 0 register address bit label default description refer to r6 (06h) mic bias control 0 6:4 micdet_thr[ 2:0] 000 micbias current detect threshold (avdd = 1.8v) 000 = 0.070ma 001 = 0.260ma 010 = 0.450ma 011 = 0.640ma 100 = 0.830ma 101 = 1.020ma 110 = 1.210ma 111 = 1.400ma values scale with avdd. 3:2 micshort_t hr[1:0] 00 micbias short circuit threshold (avdd = 1.8v) 00 = 0.520ma 01 = 0.880ma 10 = 1.240ma 11 = 1.600ma values scale with avdd.
production data WM8918 w pd, rev 4.1, january 2012 133 register address bit label default description refer to 1 micdet_ena 0 micbias current and short circuit detect enable 0 = disabled 1 = enabled 0 micbias_ena 0 micbias enable 0 = disabled 1 = enabled register 06h mic bias control 0 register address bit label default description refer to r7 (07h) mic bias control 1 2:0 micbias_sel[ 2:0] 000 selects micbias voltage (avdd=1.8v) 000 = 1.6v 001 = 2.0v 010 = 2.1v 011 = 2.4v 100 to 111 = 2.7v values scale with avdd. register 07h mic bias control 1 register address bit label default description refer to r10 (0ah) analogue dmic 0 0 dmic_osr128 1 dmic oversampling ratio 0 = normal (64 x fs) 1 = reserved this bit must be set to 0 for digital microphone operation. register 0ah analogue dmic 0 register address bit label default description refer to r12 (0ch) power managemen t 0 1 inl_ena 0 left input pga enable 0 = disabled 1 = enabled 0 inr_ena 0 right input pga enable 0 = disabled 1 = enabled register 0ch power management 0 register address bit label default description refer to r14 (0eh) power managemen t 2 1 hpl_pga_en a 0 left headphone output enable 0 = disabled 1 = enabled 0 hpr_pga_en a 0 right headphone output enable 0 = disabled 1 = enabled register 0eh power management 2
WM8918 production data w pd, rev 4.1, january 2012 134 register address bit label default description refer to r15 (0fh) power managemen t 3 1 lineoutl_pg a_ena 0 left line output enable 0 = disabled 1 = enabled 0 lineoutr_pg a_ena 0 right line output enable 0 = disabled 1 = enabled register 0fh power management 3 register address bit label default description refer to r18 (12h) power managemen t 6 3 dacl_ena 0 left dac enable 0 = dac disabled 1 = dac enabled 2 dacr_ena 0 right dac enable 0 = dac disabled 1 = dac enabled 1 dmicl_ena 0 digital microphone dsp enable 0 = disabled 1 = enabled 0 dmicr_ena 0 digital microphone dsp enable 0 = disabled 1 = enabled register 12h power management 6 register address bit label default description refer to r20 (14h) clock rates 0 14 toclk_rate _div16 0 toclk rate divider (/16) 0 = f / 1 1 = f / 16 13 toclk_rate _x4 0 toclk rate multiplier 0 = f x 1 1 = f x 4 0 mclk_div 0 enables divide by 2 on mclk 0 = sysclk = mclk 1 = sysclk = mclk / 2 register 14h clock rates 0
production data WM8918 w pd, rev 4.1, january 2012 135 register address bit label default description refer to r21 (15h) clock rates 1 13:10 clk_sys_rat e[3:0] 0011 selects the sysclk / fs ratio 0000 = 64 0001 = 128 0010 = 192 0011 = 256 0100 = 384 0101 = 512 0110 = 768 0111 = 1024 1000 = 1408 1001 = 1536 2:0 sample_rat e[2:0] 101 selects the sample rate (fs) 000 = 8khz 001 = 11.025khz, 12khz 010 = 16khz 011 = 22.05khz, 24khz 100 = 32khz 101 = 44.1khz, 48khz 110 to 111 = reserved register 15h clock rates 1 register address bit label default description refer to r22 (16h) clock rates 2 15 mclk_inv 0 mclk invert 0 = mclk not inverted 1 = mclk inverted 14 sysclk_src 0 sysclk source select 0 = mclk 1 = fll output 12 toclk_rate 0 toclk rate divider (/2) 0 = f / 2 1 = f / 1 3 opclk_ena 0 gpio clock output enable 0 = disabled 1 = enabled 2 clk_sys_en a 0 system clock enable 0 = disabled 1 = enabled 1 clk_dsp_en a 0 dsp clock enable 0 = disabled 1 = enabled 0 toclk_ena 0 zero cross timeout enable 0 = disabled 1 = enabled register 16h clock rates 2
WM8918 production data w pd, rev 4.1, january 2012 136 register address bit label default description refer to r24 (18h) audio interface 0 12 aifrxl_dati nv 0 left dac invert 0 = left dac output not inverted 1 = left dac output inverted 11 aifrxr_dati nv 0 right dac invert 0 = right dac output not inverted 1 = right dac output inverted 10:9 dac_boost[1 :0] 00 dac digital input volume boost 00 = 0db 01 = +6db (input data must not exceed -6dbfs) 10 = +12db (input data must not exceed -12dbfs) 11 = +18db (input data must not exceed -18dbfs) 8 loopback 0 digital loopback function 0 = no loopback 1 = loopback enabled (dmic data output is directly input to dac data input) 7 aiftxl_src 0 left digital audio interface source 0 = left dmic data is output on left channel 1 = right dmic data is output on left channel 6 aiftxr_src 1 right digital audio interface source 0 = left dmic data is output on right channel 1 = right dmic data is output on right channel 5 aifrxl_src 0 left dac data source select 0 = left dac outputs left channel data 1 = left dac outputs right channel data 4 aifrxr_src 1 right dac data source select 0 = right dac outputs left channel data 1 = right dac outputs right channel data 3 aiftx_comp 0 aiftx companding enable 0 = disabled 1 = enabled 2 aiftx_comp mode 0 aiftx companding type 0 = -law 1 = a-law 1 aifrx_comp 0 aifrx companding enable 0 = disabled 1 = enabled 0 aifrx_comp mode 0 aifrx companding type 0 = -law 1 = a-law register 18h audio interface 0
production data WM8918 w pd, rev 4.1, january 2012 137 register address bit label default description refer to r25 (19h) audio interface 1 13 aifrx_tdm 0 aifrx tdm enable 0 = normal aifrxdat operation 1 = tdm enabled on aifrxdat 12 aifrx_tdm_c han 0 aifrx tdm channel select 0 = aifrxdat data input on slot 0 1 = aifrxdat data input on slot 1 11 aiftx_tdm 0 aiftx tdm enable 0 = normal aiftxdat operation 1 = tdm enabled on aiftxdat 10 aiftx_tdm_c han 0 aiftx tdm channel select 0 = aiftxdat outputs data on slot 0 1 = aiftxdat output data on slot 1 8 aif_tris 0 audio interface tristate 0 = audio interface pins operate normally 1 = tristate all audio interface pins 7 aif_bclk_inv 0 bclk invert 0 = bclk not inverted 1 = bclk inverted 6 bclk_dir 0 audio interface bclk direction 0 = bclk is input 1 = bclk is output 4 aif_lrclk_in v 0 lrc polarity / dsp mode a-b select. right, left and i2s modes ? lrc polarity 0 = not inverted 1 = inverted dsp mode ? mode a-b select 0 = msb is available on 2nd bclk rising edge after lrc rising edge (mode a) 1 = msb is available on 1st bclk rising edge after lrc rising edge (mode b) 3:2 aif_wl[1:0] 10 digital audio interface word length 00 = 16 bits 01 = 20 bits 10 = 24 bits 11 = 32 bits 1:0 aif_fmt[1:0] 10 digital audio interface format 00 = right justified 01 = left justified 10 = i2s 11 = dsp register 19h audio interface 1
WM8918 production data w pd, rev 4.1, january 2012 138 register address bit label default description refer to r26 (1ah) audio interface 2 11:8 opclk_div[3: 0] 0000 gpio output clock divider 0000 = sysclk 0001 = sysclk / 2 0010 = sysclk / 3 0011 = sysclk / 4 0100 = sysclk / 5.5 0101 = sysclk / 6 0110 = sysclk / 8 0111 = sysclk / 12 1000 = sysclk / 16 1001 to 1111 = reserved 4:0 bclk_div[4:0] 0_0100 bclk frequency (master mode) 00000 = sysclk 00001 = sysclk / 1.5 00010 = sysclk / 2 00011 = sysclk / 3 00100 = sysclk / 4 00101 = sysclk / 5 00110 = sysclk / 5.5 00111 = sysclk / 6 01000 = sysclk / 8 (default) 01001 = sysclk / 10 01010 = sysclk / 11 01011 = sysclk / 12 01100 = sysclk / 16 01101 = sysclk / 20 01110 = sysclk / 22 01111 = sysclk / 24 10000 = sysclk / 25 10001 = sysclk / 30 10010 = sysclk / 32 10011 = sysclk / 44 10100 = sysclk / 48 register 1ah audio interface 2 register address bit label default description refer to r27 (1bh) audio interface 3 11 lrclk_dir 0 audio interface lrclk direction 0 = lrclk is input 1 = lrclk is output 10:0 lrclk_rate[ 10:0] 000_0100_ 0000 lrclk rate (master mode) lrclk clock output = bclk / lrclk_rate integer (lsb = 1) valid range: 8 to 2047 register 1bh audio interface 3
production data WM8918 w pd, rev 4.1, january 2012 139 register address bit label default description refer to r30 (1eh) dac digital volume left 8 dac_vu 0 dac volume update writing a 1 to this bit causes left and right dac volume to be updated simultaneously 7:0 dacl_vol[7:0 ] 1100_0000 left dac digital volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h to ffh = 0db register 1eh dac digital volume left register address bit label default description refer to r31 (1fh) dac digital volume right 8 dac_vu 0 dac volume update writing a 1 to this bit causes left and right dac volume to be updated simultaneously 7:0 dacr_vol[7: 0] 1100_0000 right dac digital volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h to ffh = 0db register 1fh dac digital volume right register address bit label default description refer to r32 (20h) dac digital 0 11:8 dmicl_dac_s vol[3:0] 0000 left digital sidetone volume 0000 = -36db 0001 = -33db (? 3db steps) 1011 = -3db 11xx = 0db 7:4 dmicr_dac_ svol[3:0] 0000 right digital sidetone volume 0000 = -36db 0001 = -33db (? 3db steps) 1011 = -3db 11xx = 0db 3:2 dmic_to_da cl[1:0] 00 left dac digital sidetone source 00 = no sidetone 01 = left dmic 10 = right dmic 11 = reserved 1:0 dmic_to_da cr[1:0] 00 right dac digital sidetone source 00 = no sidetone 01 = left dmic 10 = right dmic 11 = reserved register 20h dac digital 0
WM8918 production data w pd, rev 4.1, january 2012 140 register address bit label default description refer to r33 (21h) dac digital 1 12 dac_mono 0 dac mono mix 0 = stereo 1 = mono (mono mix output on enabled dac) 11 dac_sb_filt 0 selects dac filter characteristics 0 = normal mode 1 = sloping stopband mode (recommended when fs<=24khz) 10 dac_mutera te 0 dac soft mute ramp rate 0 = fast ramp (fs/2, maximum ramp time is 10.7ms at fs=48k) 1 = slow ramp (fs/32, maximum ramp time is 171ms at fs=48k) 9 dac_unmute _ramp 0 dac soft mute mode 0 = disabling soft-mute (dac_mute=0) will cause the dac volume to change immediately to dacl_vol and dacr_vol settings 1 = disabling soft-mute (dac_mute=0) will cause the dac volume to ramp up gradually to the dacl_vol and dacr_vol settings 6 dac_osr128 0 dac oversample rate select 0 = low power (normal osr) 1 = high performance (double osr) 3 dac_mute 1 dac soft mute control 0 = dac un-mute 1 = dac mute 2:1 deemph[1:0] 00 dac de-emphasis control 00 = no de-emphasis 01 = 32khz sample rate 10 = 44.1khz sample rate 11 = 48khz sample rate register 21h dac digital 1 register address bit label default description refer to r36 (24h) dmic digital volume left 8 dmic_vu 0 digital microphone volume update writing a 1 to this bit will cause left and right dmic volume to be updated simultaneously 7:0 dmicl_vol[7: 0] 1100_0000 left digital microphone volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h = 0db ? (0.375db steps) efh to ffh = +17.625db register 24h dmic digital volume left
production data WM8918 w pd, rev 4.1, january 2012 141 register address bit label default description refer to r37 (25h) dmic digital volume right 8 dmic_vu 0 digital microphone volume update writing a 1 to this bit will cause left and right dmic volume to be updated simultaneously 7:0 dmicr_vol[7: 0] 1100_0000 right digital microphone volume 00h = mute 01h = -71.625db 02h = -71.250db ? (0.375db steps) c0h = 0db ? (0.375db steps) efh to ffh = +17.625db register 25h dmic digital volume right register address bit label default description refer to r38 (26h) dmic digital 0 6:5 dmic_hpf_c ut[1:0] 00 dmic digital high pass filter cut-off frequency (fc) 00 = hi-fi mode (fc=4hz at fs=48khz) 01 = voice mode 1 (fc=127hz at fs=16khz) 10 = voice mode 2 (fc=130hz at fs=8khz) 11 = voice mode 3 (fc=267hz at fs=8khz) (note: fc scales with sample rate.) 4 dmic_hpf 1 dmic digital high pass filter enable 0 = disabled 1 = enabled 1 aiftxl_datin v 0 left digital microphone invert 0 = left dmic output not inverted 1 = left dmic output inverted 0 aiftxr_dati nv 0 right digital microphone invert 0 = right dmic output not inverted 1 = right dmic output inverted register 26h dmic digital 0 register address bit label default description refer to r39 (27h) digital microphone 0 12 dmic_ena 0 digital microphone mode 0 = disabled 1 = audio dsp input is from digital microphone interface when dmic_ena = 0, the digital microphone clock (dmicclk) is held low. 11 dmic_src 0 selects digital microphone data input pin 0 = in1l/dmicdat1 1 = in1r/dmicdat2 register 27h digital microphone 0
WM8918 production data w pd, rev 4.1, january 2012 142 register address bit label default description refer to r40 (28h) drc 0 15 drc_ena 0 drc enable 1 = enabled 0 = disabled 14 drc_dac_pa th 0 drc path select 0 = digital microphone path 1 = dac path 12:11 drc_gs_hys t_lvl[1:0] 00 gain smoothing hysteresis threshold 00 = low 01 = medium (recommended) 10 = high 11 = reserved 10:6 drc_startu p_gain[4:0] 0_0110 initial gain at drc startup 00000 = -3db 00001 = -2.5db 00010 = -2db 00011 = -1.5db 00100 = -1db 00101 = -0.5db 00110 = 0db (default) 00111 = 0.5db 01000 = 1db 01001 = 1.5db 01010 = 2db 01011 = 2.5db 01100 = 3db 01101 = 3.5db 01110 = 4db 01111 = 4.5db 10000 = 5db 10001 = 5.5db 10010 = 6db 10011 to 11111 = reserved 5 drc_ff_del ay 1 feed-forward delay for anti-clip feature 0 = 5 samples 1 = 9 samples time delay can be calculated as 5/fs or 9/ fs, where fs is the sample rate. 3 drc_gs_ena 1 gain smoothing enable 0 = disabled 1 = enabled 2 drc_qr 1 quick release enable 0 = disabled 1 = enabled 1 drc_anticli p 1 anti-clip enable 0 = disabled 1 = enabled 0 drc_gs_hys t 1 gain smoothing hysteresis enable 0 = disabled 1 = enabled register 28h drc 0
production data WM8918 w pd, rev 4.1, january 2012 143 register address bit label default description refer to r41 (29h) drc 1 15:12 drc_atk[3:0] 0011 gain attack rate (seconds/6db) 0000 = instantaneous 0001 = 363us 0010 = 726us 0011 = 1.45ms (default) 0100 = 2.9ms 0101 = 5.8ms 0110 = 11.6ms 0111 = 23.2ms 1000 = 46.4ms 1001 = 92.8ms 1010 = 185.6ms 1011-1111 = reserved 11:8 drc_dcy[3:0] 0010 gain decay rate (seconds/6db) 0000 = 186ms 0001 = 372ms 0010 = 743ms (default) 0011 = 1.49s 0100 = 2.97s 0101 = 5.94s 0110 = 11.89s 0111 = 23.78s 1000 = 47.56s 1001-1111 = reserved 7:6 drc_qr_thr [1:0] 01 quick release crest factor threshold 00 = 12db 01 = 18db (default) 10 = 24db 11 = 30db 5:4 drc_qr_dcy [1:0] 00 quick release decay rate (seconds/6db) 00 = 0.725ms (default) 01 = 1.45ms 10 = 5.8ms 11 = reserved 3:2 drc_mingain [1:0] 10 minimum gain the drc can use to attenuate audio signals 00 = 0db (default) 01 = -6db 10 = -12db 11 = -18db 1:0 drc_maxgai n[1:0] 00 maximum gain the drc can use to boost audio signals 00 = 12db 01 = 18db (default) 10 = 24db 11 = 36db register 29h drc 1
WM8918 production data w pd, rev 4.1, january 2012 144 register address bit label default description refer to r42 (2ah) drc 2 5:3 drc_hi_com p[2:0] 000 compressor slope r0 000 = 1 (no compression) 001 = 1/2 010 = 1/4 011 = 1/8 100 = 1/16 101 = 0 110 = reserved 111 = reserved 2:0 drc_lo_com p[2:0] 000 compressor slope r1 000 = 1 (no compression) 001 = 1/2 010 = 1/4 011 = 1/8 100 = 0 101 = reserved 11x = reserved register 2ah drc 2 register address bit label default description refer to r43 (2bh) drc 3 10:5 drc_knee_ip [5:0] 00_0000 compressor threshold t (db) 000000 = 0db 000001 = -0.75db 000010 = -1.5db ? (-0.75db steps) 111100 = -45db 111101 = reserved 11111x = reserved 4:0 drc_knee_o p[4:0] 0_0000 compressor amplitude at threshold yt (db) 00000 = 0db 00001 = -0.75db 00010 = -1.5db ? (-0.75db steps) 11110 = -22.5db 11111 = reserved register 2bh drc 3
production data WM8918 w pd, rev 4.1, january 2012 145 register address bit label default description refer to r44 (2ch) analogue left input 0 7 linmute 1 left input pga mute 0 = not muted 1 = muted 4:0 lin_vol[4:0] 0_0101 left input pga volume if l_mode = 00 (single ended) or l_mode = 01 (differential line) 00000 = -1.5 db 00001 = -1.3 db 00010 = -1.0 db 00011 = -0.7 db 00100 = -0.3 db 00101 = +0.0 db (default) 00110 = +0.3 db 00111 = +0.7 db 01000 = +1.0 db 01001 = +1.4 db 01010 = +1.8 db 01011 = +2.3 db 01100 = +2.7 db 01101 = +3.2 db 01110 = +3.7 db 01111 = +4.2 db 10000 = +4.8 db 10001 = +5.4 db 10010 = +6.0 db 10011 = +6.7 db 10100 = +7.5 db 10101 = +8.3 db 10110 = +9.2 db 10111 = +10.2 db 11000 = +11.4 db 11001 = +12.7 db 11010 = +14.3 db 11011 = +16.2 db 11100 = +19.2 db 11101 = +22.3 db 11110 = +25.2 db 11111 = +28.3 db if l_mode = 10 (differential mic) 00000 = reserved 00001 = +12 db 00010 = +15 db 00011 = +18 db 00100 = +21 db 00101 = +24 db (default) 00110 = +27 db 00111 to 11111 = +30 db register 2ch analogue left input 0
WM8918 production data w pd, rev 4.1, january 2012 146 register address bit label default description refer to r45 (2dh) analogue right input 0 7 rinmute 1 right input pga mute 0 = not muted 1 = muted 4:0 rin_vol[4:0] 0_0101 right input pga volume if r_mode = 00 (single ended) or r_mode = 01 (differential line) 00000 = -1.5 db 00001 = -1.3 db 00010 = -1.0 db 00011 = -0.7 db 00100 = -0.3 db 00101 = +0.0 db (default) 00110 = +0.3 db 00111 = +0.7 db 01000 = +1.0 db 01001 = +1.4 db 01010 = +1.8 db 01011 = +2.3 db 01100 = +2.7 db 01101 = +3.2 db 01110 = +3.7 db 01111 = +4.2 db 10000 = +4.8 db 10001 = +5.4 db 10010 = +6.0 db 10011 = +6.7 db 10100 = +7.5 db 10101 = +8.3 db 10110 = +9.2 db 10111 = +10.2 db 11000 = +11.4 db 11001 = +12.7 db 11010 = +14.3 db 11011 = +16.2 db 11100 = +19.2 db 11101 = +22.3 db 11110 = +25.2 db 11111 = +28.3 db if r_mode = 10 (differential mic) 00000 = reserved 00001 = +12 db 00010 = +15 db 00011 = +18 db 00100 = +21 db 00101 = +24 db (default) 00110 = +27 db 00111 to 11111 = +30 db register 2dh analogue right input 0
production data WM8918 w pd, rev 4.1, january 2012 147 register address bit label default description refer to r46 (2eh) analogue left input 1 6 inl_cm_ena 1 left input pga common mode rejection enable 0 = disabled 1 = enabled (only available for l_mode=01 ? differential line) 5:4 l_ip_sel_n[1: 0] 00 in single-ended or differential line modes, this field selects the input pin for the inverting side of the left input path. in differential mic mode, this field selects the input pin for the non-inverting side of the left input path. 00 = in1l 01 = in2l 1x = reserved 3:2 l_ip_sel_p[1: 0] 01 in single-ended or differential line modes, this field selects the input pin for the non-inverting side of the left input path. in differential mic mode, this field selects the input pin for the inverting side of the left input path. 00 = in1l 01 = in2l 1x = reserved 1:0 l_mode[1:0] 00 sets the mode for the left analogue input: 00 = single-ended 01 = differential line 10 = differential mic 11 = reserved register 2eh analogue left input 1
WM8918 production data w pd, rev 4.1, january 2012 148 register address bit label default description refer to r47 (2fh) analogue right input 1 6 inr_cm_ena 1 right input pga common mode rejection enable 0 = disabled 1 = enabled (only available for r_mode=01 ? differential line) 5:4 r_ip_sel_n[1 :0] 00 in single-ended or differential line modes, this field selects the input pin for the inverting side of the right input path. in differential mic mode, this field selects the input pin for the non-inverting side of the right input path. 00 = in1r 01 = in2r 1x = reserved 3:2 r_ip_sel_p[1: 0] 01 in single-ended or differential line modes, this field selects the input pin for the non-inverting side of the right input path. in differential mic mode, this field selects the input pin for the inverting side of the right input path. 00 = in1r 01 = in2r 1x = reserved 1:0 r_mode[1:0] 00 sets the mode for the right analogue input: 00 = single-ended 01 = differential line 10 = differential mic 11 = reserved register 2fh analogue right input 1 register address bit label default description refer to r57 (39h) analogue out1 left 8 hpoutl_mut e 0 left headphone output mute 0 = un-mute 1 = mute 7 hpout_vu 0 headphone output volume update writing a 1 to this bit will update hpoutl and hpoutr volumes simultaneously. 6 hpoutlzc 0 left headphone output zero cross enable 0 = disabled 1 = enabled 5:0 hpoutl_vol[ 5:0] 10_1101 left headphone output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db register 39h analogue out1 left
production data WM8918 w pd, rev 4.1, january 2012 149 register address bit label default description refer to r58 (3ah) analogue out1 right 8 hpoutr_mut e 0 right headphone output mute 0 = un-mute 1 = mute 7 hpout_vu 0 headphone output volume update writing a 1 to this bit will update hpoutl and hpoutr volumes simultaneously. 6 hpoutrzc 0 right headphone output zero cross enable 0 = disabled 1 = enabled 5:0 hpoutr_vol[ 5:0] 10_1101 right headphone output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db register 3ah analogue out1 right register address bit label default description refer to r59 (3bh) analogue out2 left 8 lineoutl_mu te 0 left line output mute 0 = un-mute 1 = mute 7 lineout_vu 0 line output volume update writing a 1 to this bit will update lineoutl and lineoutr volumes simultaneously. 6 lineoutlzc 0 left line output zero cross enable 0 = disabled 1 = enabled 5:0 lineoutl_vo l[5:0] 11_1001 left line output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db register 3bh analogue out2 left
WM8918 production data w pd, rev 4.1, january 2012 150 register address bit label default description refer to r60 (3ch) analogue out2 right 8 lineoutr_m ute 0 right line output mute 0 = un-mute 1 = mute 7 lineout_vu 0 line output volume update writing a 1 to this bit will update lineoutl and lineoutr volumes simultaneously. 6 lineoutrzc 0 right line output zero cross enable 0 = disabled 1 = enabled 5:0 lineoutr_vo l[5:0] 11_1001 right line output volume 000000 = -57db 000001 = -56db (? 1db steps) 111001 = 0db (? 1db steps) 111110 = +5db 111111 = +6db register 3ch analogue out2 right register address bit label default description refer to r61 (3dh) analogue out12 zc 3 hpl_byp_en a 0 selects input for left headphone output mux 0 = left dac 1 = left input pga (analogue bypass) 2 hpr_byp_en a 0 selects input for right headphone output mux 0 = right dac 1 = right input pga (analogue bypass) 1 lineoutl_by p_ena 0 selects input for left line output mux 0 = left dac 1 = left input pga (analogue bypass) 0 lineoutr_by p_ena 0 selects input for right line output mux 0 = right dac 1 = right input pga (analogue bypass) register 3dh analogue out12 zc register address bit label default description refer to r67 (43h) dc servo 0 3 dcs_ena_ch an_3 0 dc servo enable for lineoutr 0 = disabled 1 = enabled 2 dcs_ena_ch an_2 0 dc servo enable for lineoutl 0 = disabled 1 = enabled 1 dcs_ena_ch an_1 0 dc servo enable for hpoutr 0 = disabled 1 = enabled 0 dcs_ena_ch an_0 0 dc servo enable for hpoutl 0 = disabled 1 = enabled register 43h dc servo 0
production data WM8918 w pd, rev 4.1, january 2012 151 register address bit label default description refer to r68 (44h) dc servo 1 15 dcs_trig_si ngle_3 0 writing 1 to this bit selects a single dc offset correction for lineoutr. in readback, a value of 1 indicates that the dc servo single correction is in progress. 14 dcs_trig_si ngle_2 0 writing 1 to this bit selects a single dc offset correction for lineoutl. in readback, a value of 1 indicates that the dc servo single correction is in progress. 13 dcs_trig_si ngle_1 0 writing 1 to this bit selects a single dc offset correction for hpoutr. in readback, a value of 1 indicates that the dc servo single correction is in progress. 12 dcs_trig_si ngle_0 0 writing 1 to this bit selects a single dc offset correction for hpoutl. in readback, a value of 1 indicates that the dc servo single correction is in progress. 11 dcs_trig_se ries_3 0 writing 1 to this bit selects a series of dc offset corrections for lineoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 10 dcs_trig_se ries_2 0 writing 1 to this bit selects a series of dc offset corrections for lineoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 9 dcs_trig_se ries_1 0 writing 1 to this bit selects a series of dc offset corrections for hpoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 8 dcs_trig_se ries_0 0 writing 1 to this bit selects a series of dc offset corrections for hpoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 7 dcs_trig_st artup_3 0 writing 1 to this bit selects start-up dc servo mode for lineoutr. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 6 dcs_trig_st artup_2 0 writing 1 to this bit selects start-up dc servo mode for lineoutl. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 5 dcs_trig_st artup_1 0 writing 1 to this bit selects start-up dc servo mode for hpoutr. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 4 dcs_trig_st artup_0 0 writing 1 to this bit selects start-up dc servo mode for hpoutl. in readback, a value of 1 indicates that the dc servo start-up correction is in progress. 3 dcs_trig_da c_wr_3 0 writing 1 to this bit selects dac write dc servo mode for lineoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 2 dcs_trig_da c_wr_2 0 writing 1 to this bit selects dac write dc servo mode for lineoutl. in readback, a value of 1 indicates that the dc servo
WM8918 production data w pd, rev 4.1, january 2012 152 register address bit label default description refer to dac write correction is in progress. 1 dcs_trig_da c_wr_1 0 writing 1 to this bit selects dac write dc servo mode for hpoutr. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. 0 dcs_trig_da c_wr_0 0 writing 1 to this bit selects dac write dc servo mode for hpoutl. in readback, a value of 1 indicates that the dc servo dac write correction is in progress. register 44h dc servo 1 register address bit label default description refer to r69 (45h) dc servo 2 11:8 dcs_timer_p eriod_23[3:0] 1010 time between periodic updates for lineoutl/lineoutr. time is calculated as 0.256s x (2^period) 0000 = off 0001 = 0.52s 1010 = 266s (4min 26s) 1111 = 8519s (2hr 22s) 7 1 1 [no description available] 5 1 1 [no description available] 3:0 dcs_timer_p eriod_01[3:0] 1010 time between periodic updates for hpoutl/hpoutr. time is calculated as 0.256s x (2^period) 0000 = off 0001 = 0.52s 1010 = 266s (4min 26s) 1111 = 8519s (2hr 22s) register 45h dc servo 2 register address bit label default description refer to r71 (47h) dc servo 4 6:0 dcs_series_ no_23[6:0] 010_1010 number of dc servo updates to perform in a series event for lineoutl/lineoutr. 0 = 1 updates 1 = 2 updates ... 127 = 128 updates register 47h dc servo 4 register address bit label default description refer to r72 (48h) dc servo 5 6:0 dcs_series_ no_01[6:0] 010_1010 number of dc servo updates to perform in a series event for hpoutl/hpoutr. 0 = 1 updates 1 = 2 updates ... 127 = 128 updates register 48h dc servo 5
production data WM8918 w pd, rev 4.1, january 2012 153 register address bit label default description refer to r73 (49h) dc servo 6 7:0 dcs_dac_wr _val_3[7:0] 0000_0000 dc offset value for lineoutr in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv register 49h dc servo 6 register address bit label default description refer to r74 (4ah) dc servo 7 7:0 dcs_dac_wr _val_2[7:0] 0000_0000 dc offset value for lineoutl in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv register 4ah dc servo 7 register address bit label default description refer to r75 (4bh) dc servo 8 7:0 dcs_dac_wr _val_1[7:0] 0000_0000 dc offset value for hpoutr in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv register 4bh dc servo 8 register address bit label default description refer to r76 (4ch) dc servo 9 7:0 dcs_dac_wr _val_0[7:0] 0000_0000 dc offset value for hpoutl in dac write dc servo mode in two's complement format. in readback, the current dc offset value is returned in two's complement format. two?s complement format: lsb is 0.25mv. range is +/-32mv register 4ch dc servo 9
WM8918 production data w pd, rev 4.1, january 2012 154 register address bit label default description refer to r77 (4dh) dc servo readback 0 11:8 dcs_cal_co mplete[3:0] 0000 dc servo complete status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = dac write or start-up dc servo mode not completed. 1 = dac write or start-up dc servo mode complete. 7:4 dcs_dac_wr _complete[3 :0] 0000 dc servo dac write status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = dac write dc servo mode not completed. 1 = dac write dc servo mode complete. 3:0 dcs_startu p_complete [3:0] 0000 dc servo start-up status [3] - lineoutr [2] - lineoutl [1] - hpoutr [0] - hpoutl 0 = start-up dc servo mode not completed.. 1 = start-up dc servo mode complete. register 4dh dc servo readback 0 register address bit label default description refer to r90 (5ah) analogue hp 0 7 hpl_rmv_sh ort 0 removes hpoutl short 0 = hpoutl short enabled 1 = hpoutl short removed for normal operation, this bit should be set as the final step of the hpl enable sequence. 6 hpl_ena_ou tp 0 enables hpoutl output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 5 hpl_ena_dly 0 enables hpoutl intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after hpl_ena. 4 hpl_ena 0 enables hpoutl input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the hpl enable sequence.
production data WM8918 w pd, rev 4.1, january 2012 155 register address bit label default description refer to 3 hpr_rmv_sh ort 0 removes hpoutr short 0 = hpoutr short enabled 1 = hpoutr short removed for normal operation, this bit should be set as the final step of the hpr enable sequence. 2 hpr_ena_ou tp 0 enables hpoutr output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 1 hpr_ena_dl y 0 enables hpoutr intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after hpr_ena. 0 hpr_ena 0 enables hpoutr input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the hpr enable sequence. register 5ah analogue hp 0 register address bit label default description refer to r94 (5eh) analogue lineout 0 7 lineoutl_rm v_short 0 removes lineoutl short 0 = lineoutl short enabled 1 = lineoutl short removed for normal operation, this bit should be set as the final step of the lineoutl enable sequence. 6 lineoutl_en a_outp 0 enables lineoutl output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 5 lineoutl_en a_dly 0 enables lineoutl intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after lineoutl_ena. 4 lineoutl_en a 0 enables lineoutl input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the lineoutl enable sequence. 3 lineoutr_r mv_short 0 removes lineoutr short 0 = lineoutr short enabled 1 = lineoutr short removed for normal operation, this bit should be set as the final step of the lineoutr enable sequence.
WM8918 production data w pd, rev 4.1, january 2012 156 register address bit label default description refer to 2 lineoutr_en a_outp 0 enables lineoutr output stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the dc offset cancellation has been scheduled. 1 lineoutr_en a_dly 0 enables lineoutr intermediate stage 0 = disabled 1 = enabled for normal operation, this bit should be set to 1 after the output signal path has been configured, and before dc offset cancellation is scheduled. this bit should be set with at least 20us delay after lineoutr_ena. 0 lineoutr_en a 0 enables lineoutr input stage 0 = disabled 1 = enabled for normal operation, this bit should be set as the first step of the lineoutr enable sequence. register 5eh analogue lineout 0 register address bit label default description refer to r98 (62h) charge pump 0 0 cp_ena 0 enable charge-pump digits 0 = disable 1 = enable register 62h charge pump 0 register address bit label default description refer to r104 (68h) class w 0 0 cp_dyn_pwr 0 enable dynamic charge pump power control 0 = charge pump controlled by volume register settings (class g) 1 = charge pump controlled by real-time audio level (class w) class w is recommended for lowest power consumption. register 68h class w 0 register address bit label default description refer to r108 (6ch) write sequencer 0 8 wseq_ena 0 write sequencer enable. 0 = disabled 1 = enabled 4:0 wseq_write _index[4:0] 0_0000 sequence write index. this is the memory location to which any updates to r109 and r110 will be copied. 0 to 31 = ram addresses register 6ch write sequencer 0
production data WM8918 w pd, rev 4.1, january 2012 157 register address bit label default description refer to r109 (6dh) write sequencer 1 14:12 wseq_data_ width[2:0] 000 width of the data block written in this sequence step. 000 = 1 bit 001 = 2 bits 010 = 3 bits 011 = 4 bits 100 = 5 bits 101 = 6 bits 110 = 7 bits 111 = 8 bits 11:8 wseq_data_ start[3:0] 0000 bit position of the lsb of the data block written in this sequence step. 0000 = bit 0 ? 1111 = bit 15 7:0 wseq_addr[ 7:0] 0000_0000 control register address to be written to in this sequence step. register 6dh write sequencer 1 register address bit label default description refer to r110 (6eh) write sequencer 2 14 wseq_eos 0 end of sequence flag. this bit indicates whether the control write sequencer should stop after executing this step. 0 = not end of sequence 1 = end of sequence (stop the sequencer after this step). 11:8 wseq_delay [3:0] 0000 time delay after executing this step. total delay time per step (including execution)= 62.5s (2^wseq_delay + 8) 7:0 wseq_data[ 7:0] 0000_0000 data to be written in this sequence step. when the data width is less than 8 bits, then one or more of the msbs of wseq_data are ignored. it is recommended that unused bits be set to 0. register 6eh write sequencer 2 register address bit label default description refer to r111 (6fh) write sequencer 3 9 wseq_abor t 0 writing a 1 to this bit aborts the current sequence and returns control of the device back to the serial control interface. 8 wseq_start 0 writing a 1 to this bit starts the write sequencer at the memory location indicated by the wseq_start_index field. the sequence continues until it reaches an ?end of sequence? flag. at the end of the sequence, this bit will be reset by the write sequencer. 5:0 wseq_start _index[5:0] 00_0000 sequence start index. this is the memory location of the first command in the selected sequence. 0 to 31 = ram addresses 32 to 48 = rom addresses 49 to 63 = reserved register 6fh write sequencer 3
WM8918 production data w pd, rev 4.1, january 2012 158 register address bit label default description refer to r112 (70h) write sequencer 4 9:4 wseq_curr ent_index[5: 0] 00_0000 sequence current index (read only): this is the location of the most recently accessed command in the write sequencer memory. 0 wseq_busy 0 sequencer busy flag (read only): 0 = sequencer idle 1 = sequencer busy note: it is not possible to write to control registers via the control interface while the sequencer is busy. register 70h write sequencer 4 register address bit label default description refer to r116 (74h) fll control 1 2 fll_fracn_e na 0 fll fractional enable 0 = integer mode 1 = fractional mode fractional mode (fll_fracn_ena=1) is recommended in all cases 1 fll_osc_en a 0 fll oscillator enable 0 = disabled 1 = enabled fll_osc_ena must be enabled before enabling fll_ena. note that this field is required for free-running fll modes only. 0 fll_ena 0 fll enable 0 = disabled 1 = enabled fll_osc_ena must be enabled before enabling fll_ena. register 74h fll control 1 register address bit label default description refer to r117 (75h) fll control 2 13:8 fll_outdiv[5 :0] 00_0000 fll fout clock divider 00_0000 = reserved 00_0001 = reserved 00_0010 = reserved 00_0011 = 4 00_0100 = 5 00_0101 = 6 ? 11_1110 = 63 11_1111 = 64 (fout = fvco / fll_outdiv) 6:4 fll_ctrl_ra te[2:0] 000 frequency of the fll control block 000 = fvco / 1 (recommended value)
production data WM8918 w pd, rev 4.1, january 2012 159 register address bit label default description refer to 001 = fvco / 2 010 = fvco / 3 011 = fvco / 4 100 = fvco / 5 101 = fvco / 6 110 = fvco / 7 111 = fvco / 8 recommended that these are not changed from default. 2:0 fll_fratio[2: 0] 111 fvco clock divider 000 = 1 001 = 2 010 = 4 011 = 8 1xx = 16 000 recommended for fref > 1mhz 100 recommended for fref < 64khz register 75h fll control 2 register address bit label default description refer to r118 (76h) fll control 3 15:0 fll_k[15:0] 0000_0000 _0000_000 0 fractional multiply for fref (msb = 0.5) register 76h fll control 3 register address bit label default description refer to r119 (77h) fll control 4 14:5 fll_n[9:0] 01_0111_0 111 integer multiply for fref (lsb = 1) 3:0 fll_gain[3:0] 0000 fll gain applied to error 0000 = x 1 (recommended value) 0001 = x 2 0010 = x 4 0011 = x 8 0100 = x 16 0101 = x 32 0110 = x 64 0111 = x 128 1000 = x 256 recommended that these are not changed from default. register 77h fll control 4
WM8918 production data w pd, rev 4.1, january 2012 160 register address bit label default description refer to r120 (78h) fll control 5 4:3 fll_clk_ref _div[1:0] 00 fll clock reference divider 00 = mclk / 1 01 = mclk / 2 10 = mclk / 4 11 = mclk / 8 mclk (or other input reference) must be divided down to <=13.5mhz. for lower power operation, the reference clock can be divided down further if desired. 1:0 fll_clk_ref _src[1:0] 00 fll clock source 00 = mclk 01 = bclk 10 = lrclk 11 = reserved register 78h fll control 5 register address bit label default description refer to r121 (79h) gpio control 1 5 gpio1_pu 0 gpio1 pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 4 gpio1_pd 1 gpio1 pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 3:0 gpio1_sel[3: 0] 0100 gpio1 function select 0000 = input pin 0001 = clock output (f=sysclk/opclkdiv) 0010 = logic '0' 0011 = logic '1' 0100 = irq (deafult) 0101 = fll lock 0110 = mic detect 0111 = mic short 1000 = dmic clock out 1001 = fll clock output 1010 to 1111 = reserved register 79h gpio control 1
production data WM8918 w pd, rev 4.1, january 2012 161 register address bit label default description refer to r124 (7ch) gpio control 4 9 gpi7_ena 0 gpi7 input enable 0 = disabled 1 = enabled 8 gpi8_ena 0 gpi8 input enable 0 = disabled 1 = enabled 7 gpio_bclk_ mode_ena 0 selects bclk/gpio4 pin function 0 = bclk/gpio4 is used as bclk 1 = bclk/gpio4 is used as gpio. mclk provides the bclk in the aif in this mode. 3:0 gpio_bclk_s el[3:0] 0000 gpio_bclk function select: 0000 = input pin (deafult) 0001 = clock output (f=sysclk/opclkdiv) 0010 = logic '0' 0011 = logic '1' 0100 = irq 0101 = fll lock 0110 = mic detect 0111 = mic short 1000 = dmic clock out 1001 = fll clock output 1010 to 1111 = reserved register 7ch gpio control 4 register address bit label default description refer to r126 (7eh) digital pulls 7 mclk_pu 0 mclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 6 mclk_pd 0 mclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 5 aifrxdat_pu 0 aifrxdat pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 4 aifrxdat_pd 0 aifrxdat pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 3 lrclk_pu 0 lrclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 2 lrclk_pd 0 lrclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled 1 bclk_pu 0 bclk pull-up resistor enable 0 = pull-up disabled 1 = pull-up enabled 0 bclk_pd 0 bclk pull-down resistor enable 0 = pull-down disabled 1 = pull-down enabled register 7eh digital pulls
WM8918 production data w pd, rev 4.1, january 2012 162 register address bit label default description refer to r127 (7fh) interrupt status 10 irq 0 logical or of all other interrupt flags 9 gpio_bclk_e int 0 gpio4 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 8 wseq_eint 0 write sequence interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written. note that the read value of wseq_eint is not valid whilst the write sequencer is busy 5 gpio1_eint 0 gpio1 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 4 gpi8_eint 0 gpi8 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 3 gpi7_eint 0 gpi7 interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 2 fll_lock_ei nt 0 fll lock interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 1 mic_shrt_ei nt 0 micbias short circuit interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written 0 mic_det_ein t 0 micbias current detect interrupt 0 = interrupt not set 1 = interrupt is set cleared when a ?1? is written register 7fh interrupt status
production data WM8918 w pd, rev 4.1, january 2012 163 register address bit label default description refer to r128 (80h) interrupt status mask 9 im_gpio_bcl k_eint 1 gpio4 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 8 im_wseq_ein t 1 write sequencer interrupt mask 0 = do not mask interrupt 1 = mask interrupt 5 im_gpio1_ein t 1 gpio1 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 4 im_gpi8_eint 1 gpi8 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 3 im_gpi7_eint 1 gpi7 interrupt mask 0 = do not mask interrupt 1 = mask interrupt 2 im_fll_lock _eint 1 fll lock interrupt mask 0 = do not mask interrupt 1 = mask interrupt 1 im_mic_shrt _eint 1 micbias short circuit interrupt mask 0 = do not mask interrupt 1 = mask interrupt 0 im_mic_det_ eint 1 micbias current detect interrupt mask 0 = do not mask interrupt 1 = mask interrupt register 80h interrupt status mask register address bit label default description refer to r129 (81h) interrupt polarity 9 gpio_bclk_e int_pol 0 gpio4 interrupt polarity 0 = active high 1 = active low 8 wseq_eint_ pol 0 write sequencer interrupt polarity 0 = active high (interrupt is triggered when wseq is busy) 1 = active low (interrupt is triggered when wseq is idle) 5 gpio1_eint_ pol 0 gpio1 interrupt polarity 0 = active high 1 = active low 4 gpi8_eint_p ol 0 gpi8 interrupt polarity 0 = active high 1 = active low 3 gpi7_eint_p ol 0 gpi7 interrupt polarity 0 = active high 1 = active low 2 fll_lock_ei nt_pol 0 fll lock interrupt polarity 0 = active high (interrupt is triggered when fll lock is reached) 1 = active low (interrupt is triggered when fll is not locked) 1 mic_shrt_ei nt_pol 0 micbias short circuit interrupt polarity 0 = active high
WM8918 production data w pd, rev 4.1, january 2012 164 register address bit label default description refer to 1 = active low 0 mic_det_ein t_pol 0 micbias current detect interrupt polarity 0 = active high 1 = active low register 81h interrupt polarity register address bit label default description refer to r130 (82h) interrupt debounce 9 gpio_bclk_e int_db 0 gpio4 interrupt debounce 0 = disabled 1 = enabled 8 wseq_eint_ db 0 write sequencer interrupt debounce enable 0 = disabled 1 = enabled 5 gpio1_eint_ db 0 gpio1 input debounce 0 = disabled 1 = enabled 4 gpi8_eint_d b 0 gpi8 input debounce 0 = disabled 1 = enabled 3 gpi7_eint_d b 0 gpi7 input debounce 0 = disabled 1 = enabled 2 fll_lock_ei nt_db 0 fll lock debounce 0 = disabled 1 = enabled 1 mic_shrt_ei nt_db 0 micbias short circuit interrupt debounce 0 = disabled 1 = enabled 0 mic_det_ein t_db 0 micbias current detect interrupt debounce 0 = disabled 1 = enabled register 82h interrupt debounce register address bit label default description refer to r134 (86h) eq1 0 eq_ena 0 eq enable 0 = eq disabled 1 = eq enabled register 86h eq1
production data WM8918 w pd, rev 4.1, january 2012 165 register address bit label default description refer to r135 (87h) eq2 4:0 eq_b1_gain[ 4:0] 0_1100 gain for eq band 1 00000 = -12db 00001 = -11db (? 1db steps) 01100 = 0db (? 1db steps) 11000 = +12db 11001 to 11111 = reserved register 87h eq2 register address bit label default description refer to r136 (88h) eq3 4:0 eq_b2_gain[ 4:0] 0_1100 gain for eq band 2 00000 = -12db 00001 = -11db (? 1db steps) 01100 = 0db (? 1db steps) 11000 = +12db 11001 to 11111 = reserved register 88h eq3 register address bit label default description refer to r137 (89h) eq4 4:0 eq_b3_gain[ 4:0] 0_1100 gain for eq band 3 00000 = -12db 00001 = -11db (? 1db steps) 01100 = 0db (? 1db steps) 11000 = +12db 11001 to 11111 = reserved register 89h eq4 register address bit label default description refer to r138 (8ah) eq5 4:0 eq_b4_gain[ 4:0] 0_1100 gain for eq band 4 00000 = -12db 00001 = -11db (? 1db steps) 01100 = 0db (? 1db steps) 11000 = +12db 11001 to 11111 = reserved register 8ah eq5
WM8918 production data w pd, rev 4.1, january 2012 166 register address bit label default description refer to r139 (8bh) eq6 4:0 eq_b5_gain[ 4:0] 0_1100 gain for eq band5 00000 = -12db 00001 = -11db (? 1db steps) 01100 = 0db (? 1db steps) 11000 = +12db 11001 to 11111 = reserved register 8bh eq6 register address bit label default description refer to r140 (8ch) eq7 15:0 eq_b1_a[15:0] 0000_1111 _1100_101 0 eq band 1 coefficient a register 8ch eq7 register address bit label default description refer to r141 (8dh) eq8 15:0 eq_b1_b[15:0] 0000_0100 _0000_000 0 eq band 1 coefficient b register 8dh eq8 register address bit label default description refer to r142 (8eh) eq9 15:0 eq_b1_pg[15: 0] 0000_0000 _1101_100 0 eq band 1 coefficient pg register 8eh eq9 register address bit label default description refer to r143 (8fh) eq10 15:0 eq_b2_a[15:0] 0001_1110 _1011_010 1 eq band 2 coefficient a register 8fh eq10 register address bit label default description refer to r144 (90h) eq11 15:0 eq_b2_b[15:0] 1111_0001 _0100_010 1 eq band 2 coefficient b register 90h eq11
production data WM8918 w pd, rev 4.1, january 2012 167 register address bit label default description refer to r145 (91h) eq12 15:0 eq_b2_c[15:0] 0000_1011 _0111_010 1 eq band 2 coefficient c register 91h eq12 register address bit label default description refer to r146 (92h) eq13 15:0 eq_b2_pg[15: 0] 0000_0001 _1100_010 1 eq band 2 coefficient pg register 92h eq13 register address bit label default description refer to r147 (93h) eq14 15:0 eq_b3_a[15:0] 0001_1100 _0101_100 0 eq band 3 coefficient a register 93h eq14 register address bit label default description refer to r148 (94h) eq15 15:0 eq_b3_b[15:0] 1111_0011 _0111_001 1 eq band 3 coefficient b register 94h eq15 register address bit label default description refer to r149 (95h) eq16 15:0 eq_b3_c[15:0] 0000_1010 _0101_010 0 eq band 3 coefficient c register 95h eq16 register address bit label default description refer to r150 (96h) eq17 15:0 eq_b3_pg[15: 0] 0000_0101 _0101_100 0 eq band 3 coefficient pg register 96h eq17 register address bit label default description refer to r151 (97h) eq18 15:0 eq_b4_a[15:0] 0001_0110 _1000_111 0 eq band 4 coefficient a register 97h eq18
WM8918 production data w pd, rev 4.1, january 2012 168 register address bit label default description refer to r152 (98h) eq19 15:0 eq_b4_b[15:0] 1111_1000 _0010_100 1 eq band 4 coefficient b register 98h eq19 register address bit label default description refer to r153 (99h) eq20 15:0 eq_b4_c[15:0] 0000_0111 _1010_110 1 eq band 4 coefficient c register 99h eq20 register address bit label default description refer to r154 (9ah) eq21 15:0 eq_b4_pg[15: 0] 0001_0001 _0000_001 1 eq band 4 coefficient pg register 9ah eq21 register address bit label default description refer to r155 (9bh) eq22 15:0 eq_b5_a[15:0] 0000_0101 _0110_010 0 eq band 5 coefficient a register 9bh eq22 register address bit label default description refer to r156 (9ch) eq23 15:0 eq_b5_b[15:0] 0000_0101 _0101_100 1 eq band 1 coefficient b register 9ch eq23 register address bit label default description refer to r157 (9dh) eq24 15:0 eq_b5_pg[15: 0] 0100_0000 _0000_000 0 eq band 5 coefficient pg register 9dh eq24
production data WM8918 w pd, rev 4.1, january 2012 169 register address bit label default description refer to r247 (f7h) fll nco test 0 0 fll_frc_nc o 0 fll forced control select 0 = normal 1 = fll oscillator controlled by fll_frc_nco_val (note that this field is required for free-running fll modes only) register f7h fll nco test 0 register address bit label default description refer to r248 (f8h) fll nco test 1 5:0 fll_frc_nc o_val[5:0] 01_1001 fll forced oscillator value valid range is 000000 to 111111 0x19h (011001) = 12mhz approx (note that this field is required for free-running fll modes only) register f8h fll nco test 1
WM8918 production data w pd, rev 4.1, january 2012 170 applications information recommended external components figure 71 recommended external components notes: 1. decoupling capacitors x5r ceramic capacitor is recommended for capaci tors c1, c2, c3, c4, c5 , c15, c16, c17 and c18. the positioning of c17 and c18 is very important - these should be as close to the WM8918 as possible. capacitors c15 and c16 should also be pos itioned as close to the WM8918 as possible. 2. charge pump capacitors specific recommendations for c14, c15 and c16 are provided in table 88. note that two different recommendations are provided for c15 and c16; either of these components is su itable, depending upon size requirements and availability. the positioning of c14 is very important - this should be as close to the WM8918 as possible. it is important to select a suitable capacitor type for the charge pump. note that the capacitance may vary with dc voltage; care is required to ensure that required capacitance is achieved at the applicable operating voltage, as specified in table 88. the capacitor datasheet should be consulted for this information. component required capacitance value part number voltage type size c14 (cpca-cpcb) ? 1? f at 2vdc 2.2 ? f kemet c0402c225m9pac 6.3v x5r 0402 c15 (cpvoutn) c16 (cpvoutp) ? 2? f at 2vdc 2.2? f murata grm188r61a225ke34d 10v x5r 0603 4.7? f murata grm155r60j475m_eia 6.3v x5r 0402 table 88 charge pump capacitors
production data WM8918 w pd, rev 4.1, january 2012 171 3. zobel networks the zobel network shown in figure 71 is required on hp outl, hpoutr, lineoutl and lineoutr whenever that output is enabled. stability of these ground-referenced outputs across all process corners cannot be guaranteed without the zobel network components. (note that, if any ground-referenced output pin is not required, the zobel network components can be omitted from the output pin, and the pin can be left floating.) the zobel network requirement is detailed further in the applications note wan_0212 ?class w headphone impedance compensation?. zobel networks (c6, c7, c8, c9, r1, r2, r3, r4 ) should be positioned reasonably close to the WM8918. 4. microphone grounding r7 can be populated with other values to remove common mode noise on the microphone if required.
WM8918 production data w pd, rev 4.1, january 2012 172 mic detection sequence using micbias current this section details an example sequence which summarises how the host processor can configure and detect the events supported by the micbias current detect function (see ?electret condenser microphone interface?): ? mic insertion/removal ? hook switch press/release figure 72 shows an example of how the micbias current flow varies versus time, during mic insertion and hook switch events. the y axis is annotated with the mic detection thresholds, and the x axis is annotated with the stages of an example sequence as detailed in table 89, to illustrate how the host processor can implement mic insertion and hook switch detection. the sequence assumes that the microphone insertion and hook switch detection functions are monitored by polling the interrupt flags using the control interface. note that the maximum mechanical bounce times for mic insertion and removal must be fully understood by the software programmer. a gpio pin could be used as an alternative mec hanism to monitor the micbias detection functions. this enables the host processor to detect mechanical bounce at any time. time mic hook switch threshold mic detect interrupt micbias current (1) (2) (4) (5) (6) (7) (8) (9) t det t det mic detect threshold hysteresis (3) (10) t short t short mic detect interrupt polarity mic short interrupt mic short interrupt polarity mic_det_eint mic_det_eint_pol mic_shrt_eint mic_shrt_eint_pol host processor read the mic detect interrupt flag. if high, can then set mic_det_eint_pol to 1, but only if mechanical bounce phase has finished. clear mic_det_eint by writing ?1?. read the hook switch interrupt flag. if high, can immediately set mic_shrt_eint_pol to 1. clear mic_shrt_eint by writing ?1?. read the hook switch interrupt flag. if high, can immediately clear mic_shrt_eint_pol to 0. clear mic_shrt_eint by writing ?1?. read the mic detect interrupt flag. if high, can then clear mic_det_eint_pol to 0, but only if mechanical bounce phase has finished. clear mic_det_eint by writing ?1?. step (1) (2) (4) (5) (6) (7) (8) (9) (3) (10) step example plot of micbias current versus time mic inserted hook switch pressed figure 72 mic insert and hook switch detect: example micbias current plot
production data WM8918 w pd, rev 4.1, january 2012 173 step details 1 mic not inserted. to detect mic insertion, host processor must initialise interrupts and clear mic_det_eint_pol = 0. at every step, the host processor should poll the interrupt status register. note that mic insertion de-bounce circuitry can be enabled by setting mic_det_eint_db = 1. 2 mechanical bounce of jack socket during mic insertion. host processor may already detect a mic insertion interrupt (mic_det_eint) during this step. once detected, the host pr ocessor can set mic_det_eint_pol = 1 and then clear the interrupt, unless mechanical bounce can last longer than the shortest possible t det , in which case the host processor should wait until step 3. 3 mic fully inserted. if not already set, the host processor must now set mic_det_eint_pol = 1. if not already cleared, the host processor must now clear the mic_det_eint interrupt. to detect hook switch press, the host processor must clear mic_shrt_eint_pol = 0. at this step, the diagram shows no ac current swing, due to a very low ambient noise level. 4 mic fully inserted. diagram shows ac current swing due to high levels of background noise (such as wind). 5 mechanical bounce during hook switch press. the hook switch interrupt is unlikely to be set during this step, because 10 successive samples of the micbias current exceeding the hook switch threshold have not yet been sampled. note that hook switch de-bounce circuitry can be enabled by setting mic_shrt_eint_db = 1. 6 hook switch is fully pressed down. after t short , 10 successive samples of the micbias current exceeding the hook switch threshold have been detected, hence a hook switch interrupt (mic_shrt_eint) will be generated. once detected, the host processor can immediately set mic_shrt_eint_pol = 1 and then clear the mic_shrt_eint interrupt. 7 mechanical bounce during hook switch release. the hook swit ch interrupt is unlikely to be set during this step, because 10 successive samples of the micbias current lower than the hook switch threshold have not yet been sampled. 8 hook switch fully released. after t short , 10 successive samples of the micbias current lower than the hook switch threshold have been detected, hence a hook switch interrupt (mic_shrt_eint) will be generated. once detected, the host processor can immediately clear mic_shrt_eint_ pol = 0 and then clear the mic_shrt_eint interrupt. 9 mechanical bounce of jack socket during mic removal. host processor may already detect a mic removal interrupt (mic_det_eint) during this step. once detected, the host proc essor can clear mic_det_eint_pol = 0 and then clear the interrupt, unless mechanical bounce can last longer than the shortest possible t det , in which case the host processor should wait until step 10. 10 mic fully removed. if not already cleared, the host processor must now clear mic_det_eint_pol = 0. if not already cleared, the host processor must now clear the mic_det_eint interrupt. table 89 mic insert and hook switch detect: example sequence alternatively, utilising a gpio pin to monitor the micbias current detect functionality permits the host processor to monitor the steady state of microphone detection or hook switch press functions. because the gpio shows the steady state condition, software de-bounce may be easier to implement in the host processor, dependant on the processor performance characteristics, hence use of the gpio is likely to simplify the rejection of mechanical bounce. changes of state in the gpio pin are also subject to the time delays t det and t short .
WM8918 production data w pd, rev 4.1, january 2012 174 package dimensions fl: 32 pin qfn plastic package 4 x 4 x 0.75 mm body, 0.40 mm lead pitch e2 b b 15 a 8 9 e c 0.08 c ccc a a1 c a3 seating plane 1 l index area (d/2 x e/2) top view d c aaa 2 x c aaa 2 x e 1 17 24 25 32 d2 bc bbb m a 5 4 notes: 1. dimension b applies to metallized terminal and is measured between 0.15 mm and 0.25 mm from terminal tip. 2. all dimensions are in millimetres. 3. the terminal #1 identifier and terminal numbering convention shall conform to jedec 95-1 spp-002. 4. coplanarity applies to the exposed heat sink slug as well as the terminals. 5. refer to application note wan_0118 for further information regarding pcb footprints and qfn package soldering. 6. this drawing is subject to change without notice. a3 g b exposed lead detail 1 detail 1 exposed ground paddle 6 bottom view side view 16 dm067.a dimensions (mm) symbols min nom max note a a1 a3 0.70 0.75 0.8 0.05 0.035 0 0.203 ref b d d2 e e2 e l 0.25 0.15 4.00 bsc 2.75 2.7 2.65 0.40 bsc 0.35 0.40 0.45 1 2 2 4.00 bsc 2.75 2.7 2.65 0.10 aaa bbb ccc ref: 0.05 0.10 tolerances of form and position 0.2 0.5 g
production data WM8918 w pd, rev 4.1, january 2012 175 important notice wolfson microelectronics plc (?wolfson?) products and services are sold subject to wolfson?s terms and conditions of sale, delivery and payment supplied at the time of order acknowledgement. wolfson warrants performance of its products to the specifications in effect at the date of shipment. wolfson reserves the right to make changes to its products and specifications or to discontinue any product or service without notice. customers should therefore obtain the latest version of relevant informati on from wolfson to verify that the information is current. testing and other quality control techniques are utilised to the extent wolfson deems necessary to support its warranty. specific testing of all parameters of each device is not ne cessarily performed unless required by law or regulation. in order to minimise risks associated with customer applications, the customer must use adequate design and operating safeguards to minimise inherent or procedural hazards. wolfs on is not liable for applications assistance or customer product design. the customer is solely responsible for its selection and use of wolfson products. wolfson is not liable for such selection or use nor for use of any circuitry other than circuitry entirely embodied in a wolfson product. wolfson?s products are not intended for use in life support sy stems, appliances, nuclear systems or systems where malfunction can reasonably be expected to result in personal injury, death or severe property or environmental damage. any use of products by the customer for such purposes is at the customer?s own risk. wolfson does not grant any licence (express or implied) under any patent right, copyright, mask work right or other intellectual property right of wolfson covering or relating to any combination, machine, or process in which its products or services might be or are used. any provision or publication of any third party?s products or services does not constitute wolfson?s approval, licence, warranty or endorsement thereof. any third party trade marks contained in this document belong to the respective third party owner. reproduction of information from wolfson datasheets is per missible only if reproduction is without alteration and is accompanied by all associated copyright, proprietary and other noti ces (including this notice) and conditions. wolfson is not liable for any unauthorised alteration of such information or for any reliance placed thereon. any representations made, warranties given, and/or liabilities accepted by any person which differ from those contained in this datasheet or in wolfson?s standard terms and conditions of sale, delivery and payment are made, given and/or accepted at that person?s own risk. wolfson is not liable for any such representations, warranties or liabilities or for any reliance placed thereon by any person. address wolfson microelectronics plc westfield house 26 westfield road edinburgh eh11 2qb tel :: +44 (0)131 272 7000 fax :: +44 (0)131 272 7001 email :: sales@wolfsonmicro.com
WM8918 production data w pd, rev 4.1, january 2012 176 revision history date rev originator changes 15/12/11 4.1 jmacd order codes updated from WM8918gefl/v and WM8918gefl/rv to WM8918cgefl/v and WM8918cgefl/rv to reflect change to copper wire bonding.


▲Up To Search▲   

 
Price & Availability of WM8918

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X